home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / gnu / gpp-1_42.lha / g++-1.42.0 / HINTS < prev    next >
Text File  |  1991-10-19  |  84KB  |  2,542 lines

  1. BABYL OPTIONS:
  2. Version: 5
  3. Labels:
  4. Note:   This is the header of an rmail file.
  5. Note:   If you are seeing it in rmail,
  6. Note:    it means the file has no messages in it.
  7. 
  8. 1,,
  9. Return-Path: <csmith@convex.com>
  10. Received: by teacake.sun.com (4.0/SMI-4.0)
  11.     id AA01354; Thu, 18 Jan 90 19:09:01 PST
  12. Date: Thu, 18 Jan 90 19:09:01 -0600
  13. From: csmith@convex.com (Chris Smith)
  14. To: ngo%tammy@harvard (Tom Ngo)
  15. In-Reply-To: ngo%tammy@HARVARD.HARVARD.EDU's message of 17 Jan 90 22:12:19 GMT
  16. Subject: How to use collect2... my conjecture
  17. Status: R
  18.  
  19. *** EOOH ***
  20. Return-Path: <csmith@convex.com>
  21. Date: Thu, 18 Jan 90 19:09:01 -0600
  22. From: csmith@convex.com (Chris Smith)
  23. To: ngo%tammy@harvard (Tom Ngo)
  24. In-Reply-To: ngo%tammy@HARVARD.HARVARD.EDU's message of 17 Jan 90 22:12:19 GMT
  25. Subject: How to use collect2... my conjecture
  26.  
  27. Sorry, I've been neglecting my netnews reading and didn't see your
  28. earlier messages. 
  29.  
  30. The secret of collect2.c is to install it as "/usr/local/lib/gcc-ld"
  31. --- it then does its thing with the constructors & destructors and
  32. runs the real ld.
  33. 
  34. 1,,
  35. Return-Path: <@nsfnet-relay.ac.uk,@computer-lab.cambridge.ac.uk:balen@camscan.uucp>
  36. Received: by teacake.sun.com (4.0/SMI-4.0)
  37.     id AA01354; Wed, 17 Jan 90 09:35:21  PST
  38. Date: Wed, 17 Jan 90 09:35:21 GMT
  39. From: henry Balen <balen%camscan.uucp@nsfnet-relay.ac.uk>
  40. To: bug-g++@prep.ai.mit.edu
  41. Subject: HINTS
  42. Reply-To: balen%camscan.uucp@nsfnet-relay.ac.uk
  43. Status: R
  44.  
  45. *** EOOH ***
  46. Return-Path: <@nsfnet-relay.ac.uk,@computer-lab.cambridge.ac.uk:balen@camscan.uucp>
  47. Date: Wed, 17 Jan 90 09:35:21 GMT
  48. From: henry Balen <balen%camscan.uucp@nsfnet-relay.ac.uk>
  49. To: bug-g++@prep.ai.mit.edu
  50. Subject: HINTS
  51. Reply-To: balen%camscan.uucp@nsfnet-relay.ac.uk
  52.  
  53. I have managed to get g++ 1.36.2 up and running on the sun386. I had a lot of problems with 1.36.1 in that when I did get the compiler to work it produced code that crashed!
  54. I have listed the changes that I found necessary for 1.36.2 below. I hope that these are of some help.
  55.  
  56. Henry Balen <balen%camscan.uucp@uk.ac.ukc>
  57. Camscan, Saxon Way, Bar Hill, Cambridge CB3 0JE, United Kingdom.
  58.  
  59. --------------------------------------------------------------------------
  60. In xm-sun386i.h at line 47
  61.  
  62.     #define LINK_SPEC "%{!e*:-e _start} -dc -dp %{g:-Bstatic}"
  63.  
  64. to
  65.  
  66.     #define LINK_SPEC "%{!e*:}  -Bstatic "
  67.  
  68. --------------------------------------------------------------------------
  69. In crt0.c
  70.  
  71. the
  72.     __do_global_init()
  73. and
  74.     __do_global_cleanup()
  75.  
  76. needed to be removed (I put ifndef COFF round them).
  77.  
  78. --------------------------------------------------------------------------
  79. In tm-sun386i.h at line 34
  80.  
  81.     #define STARTFILE_SPEC  \
  82.       "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}"
  83.  
  84. to
  85.  
  86.     #define STARTFILE_SPEC  \
  87.       "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0+.o%s}}"
  88.  
  89. --------------------------------------------------------------------------
  90. In gcc.c at line 306
  91.  
  92.     ld %{o*} %g.R %g.O
  93.  
  94. to
  95.  
  96.     ld -Bstatic -e _start %{o*} %g.R %g.O -L/vol/local/lib.sun386\n\
  97.  
  98. and at line 310
  99.  
  100.     char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -o %g.R %l\
  101.  
  102. to
  103.  
  104.     char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld -r -L/vol/local/lib.sun386 -o %g.R %l\
  105. 
  106. 1,,
  107. Return-Path: <csusac!cvms!ronald@ucdavis.edu>
  108. Date: Tue, 12 Sep 89 15:40:39 edt
  109. From: csusac!cvms!ronald@ucdavis.edu
  110. To: csusac!ucdavis!prep.ai.mit.edu!info-g++@ucdavis.edu
  111. Subject: UNIX PC
  112.  
  113. *** EOOH ***
  114. Return-Path: <csusac!cvms!ronald@ucdavis.edu>
  115. Date: Tue, 12 Sep 89 15:40:39 edt
  116. From: csusac!cvms!ronald@ucdavis.edu
  117. To: csusac!ucdavis!prep.ai.mit.edu!info-g++@ucdavis.edu
  118. Subject: UNIX PC
  119.  
  120. If you have an AT&T UNIX PC, here are some patches which may be of
  121. some consolation.  They are from:
  122.  
  123. Ronald Cole               | uucp:     cvms!ronald       voice: +1 916 895 8321
  124. Senior Software Engineer  | internet: cvms!ronald@csuchico.edu
  125. CVM Systems               +----------------------------------------------------
  126.  
  127. diff -rc2 g++-1.36.0-/config/tm-att386.h g++/config/tm-att386.h
  128. *** g++-1.36.0-/config/tm-att386.h    Wed Feb 22 09:28:08 1989
  129. --- g++/config/tm-att386.h    Wed Oct 18 22:46:58 1989
  130. ***************
  131. *** 23,26 ****
  132. --- 23,29 ----
  133.   /* Define the syntax of instructions and addresses.  */
  134.   
  135. + /* G++: ATT assemblers *do not* allow '$' in symbol names. (u3b, i386, etc.) */
  136. + #define NO_DOLLAR_IN_LABEL 1
  137.   /* Define some concatenation macros to concatenate an opcode
  138.      and one, two or three operands.  In other assembler syntaxes
  139.  
  140. 
  141. 1,,
  142. Return-Path: <@ORION.CF.UCI.EDU,@paris.ics.UCI.EDU:schmidt@glacier.ICS.UCI.EDU>
  143. To: tiemann@sun.com
  144. Subject: HINTS
  145. From: "Douglas C. Schmidt" <schmidt%glacier.ics.uci.edu@ORION.CF.UCI.EDU>
  146.  
  147. *** EOOH ***
  148. Return-Path: <@ORION.CF.UCI.EDU,@paris.ics.UCI.EDU:schmidt@glacier.ICS.UCI.EDU>
  149. To: tiemann@sun.com
  150. Subject: HINTS
  151. From: "Douglas C. Schmidt" <schmidt%glacier.ics.uci.edu@ORION.CF.UCI.EDU>
  152.  
  153. Beginning with g++ version 1.36 the GNU G++ library, libg++, is no
  154. longer automatically linked with your object code when running the
  155. linker.  In order to link libg++ you need to explicity add -lg++ to
  156. your compilation command line or Makefile, e.g.,
  157.  
  158. % g++ -g -O foobar.c -lg++
  159.  
  160. The easiest way to make this change transparent to you is simply to
  161. make an alias for g++ that automagically appends -lg++ to the end.
  162.  
  163. Douglas C. Schmidt
  164. schmidt@ics.uci.edu
  165.  
  166. 
  167. 1,,
  168. Return-Path: <mlm@cs.brown.edu>
  169. From: mlm@cs.brown.edu (Moises Lejter)
  170. To: bug-g++@prep.ai.mit.edu
  171. Subject: HINTS
  172. Reply-To: mlm@cs.brown.edu
  173.  
  174. *** EOOH ***
  175. Return-Path: <mlm@cs.brown.edu>
  176. From: mlm@cs.brown.edu (Moises Lejter)
  177. To: bug-g++@prep.ai.mit.edu
  178. Subject: HINTS
  179. Reply-To: mlm@cs.brown.edu
  180.  
  181.     Sun3 SunOS 4.0: ld++ cannot find Mcrt0.o:
  182.  
  183.     Turns out that gcc.c as distributed allows you to redefine
  184.     STANDARD_STARTFILE_PREFIX to be any directory you want.  It
  185.     will check there and in /usr/local/lib     for startup files, not
  186.     in /usr/lib.  Unfortunately, most system startup files live in
  187.     /usr/lib, so unless you define STANDARD_STARTFILE_PREFIX to be
  188.     /usr/lib, you'll lose.  I changed the line in gcc.c
  189.  
  190.     char *standard_startfile_prefix_1 = "/usr/local/lib/";
  191.  
  192.     to read 
  193.  
  194.     char *standard_startfile_prefix_1 = "/usr/lib/";
  195.  
  196.     This way I can specify my own startfile directory, without
  197.     losing access to the system startup files.
  198.  
  199.                         Moises
  200.  
  201. Internet/CSnet:   mlm@cs.brown.edu        BITNET:  mlm@browncs.BITNET
  202. UUCP:    ...!uunet!brunix!mlm            Phone:     (401)863-7664
  203. USmail:  Moises Lejter, Box 1910 Brown University, Providence RI 02912
  204. 
  205. 1,,
  206. Return-Path: <tiemann>
  207. Received: by teacake.sun.com (4.0/SMI-4.0)
  208.     id AA01354; Sat, 3 Feb 90 09:02:12 PST
  209. Date: Sat, 3 Feb 90 09:02:12 PST
  210. From: tiemann (Michael Tiemann)
  211. Message-Id: <9002031702.AA01354@teacake.sun.com>
  212. To: bug-g++@prep.ai.mit.edu
  213. Subject: HINTS
  214. Reply-To: tiemann@sun.com
  215. Status: R
  216.  
  217. *** EOOH ***
  218. Return-Path: <tiemann>
  219. Date: Sat, 3 Feb 90 09:02:12 PST
  220. From: tiemann (Michael Tiemann)
  221. To: bug-g++@prep.ai.mit.edu
  222. Subject: HINTS
  223. Reply-To: tiemann@sun.com
  224.  
  225.     If you are using a non-Sun machine, and use the native
  226.     assembler instead of GAS, you will need to #define FASCIST_ASSEMBLER
  227.     when compiling cplus-decl.c.  This is because Sun's as and GAS
  228.     appear to be the only assemblers out there which assemble stabs
  229.     instead of checking them.  If you don't remember to do
  230.     this, the assembler will remind you by telling you that it did
  231.     not understand a stab which the compiler is trying to pass to
  232.     the linker.
  233.  
  234. Michael Tiemann
  235. tiemann@lurch.stanford.edu
  236. 
  237. 1,,
  238. Return-Path: <tiemann>
  239. Received: by teacake.sun.com (4.0/SMI-4.0)
  240.     id AA01354; Sat, 3 Feb 90 09:02:12 PST
  241. Date: Sat, 3 Feb 90 09:02:12 PST
  242. From: tiemann (Michael Tiemann)
  243. Message-Id: <9002031702.AA01354@teacake.sun.com>
  244. To: bug-g++@prep.ai.mit.edu
  245. Subject: HINTS
  246. Reply-To: tiemann@sun.com
  247. Status: R
  248.  
  249. *** EOOH ***
  250. Return-Path: <tiemann>
  251. Date: Sat, 3 Feb 90 09:02:12 PST
  252. From: tiemann (Michael Tiemann)
  253. To: bug-g++@prep.ai.mit.edu
  254. Subject: HINTS
  255. Reply-To: tiemann@sun.com
  256.  
  257. The 2.0 C++ language specification provides many new features which
  258. can trip up the novice user.  All of these features are being
  259. implemented in GNU C++, and most of them work right now.  However,
  260. this does not mean that they are all that easily used.  Perhaps on of
  261. the toughest new features to take advantage of right now is extern "C".
  262. What makes this hard is that up until now, C and C++ really looked
  263. like they had about the same langauge linkage.  Member functions had
  264. their names mangled, but non-overloaded global functions did not.
  265. In 2.0, all functions declared in C++ scope are automatically
  266. overloaded, and all such functions all get mangled names.  So if you
  267. declare, e.g., `int printf (const char *, ...)' in C++ language scope,
  268. and you get printf from libc.a, you will lose, since the compiler will
  269. assume that you are looking for e.g., "_printf_PQI", when you are
  270. really looking for "_printf".  To get around this problem, you can use
  271. extern "C" to tell the compiler which names should be mangled and how.
  272. There is a macro called NO_AUTO_OVERLOAD, which if defined, will provide
  273. the standard cfront 1.2 and old GNU C++ behavior.  If not defined, it
  274. provides the cfront 2.0 behavior.  One should move from the old to the
  275. new carefully, and if you get lots of new undefined symbols from the
  276. linker where such did not exist before, the first question you should
  277. ask yourself is `how is extern "C" or extern "C++" doing me in?'
  278.  
  279. Michael Tiemann
  280. tiemann@lurch.stanford.edu
  281. 
  282. 1,,
  283. Return-Path: <tiemann>
  284. Received: by teacake.sun.com (4.0/SMI-4.0)
  285.     id AA01354; Sat, 3 Feb 90 09:02:12 PST
  286. Date: Sat, 3 Feb 90 09:02:12 PST
  287. From: tiemann (Michael Tiemann)
  288. Message-Id: <9002031702.AA01354@teacake.sun.com>
  289. To: bug-g++@prep.ai.mit.edu
  290. Subject: HINTS
  291. Reply-To: tiemann@sun.com
  292. Status: R
  293.  
  294. *** EOOH ***
  295. Return-Path: <tiemann>
  296. Date: Sat, 3 Feb 90 09:02:12 PST
  297. From: tiemann (Michael Tiemann)
  298. To: bug-g++@prep.ai.mit.edu
  299. Subject: HINTS
  300. Reply-To: tiemann@sun.com
  301.  
  302. The default LINK_SPEC in gcc.c tells the linker to link
  303. with crt0+.o.  Many machine-specific files define their own
  304. LINK_SPECs.  A strategy which worked until tm-sun?-nfp-os? came along
  305. was to edit the tm-*.h file into tm-*+.h, and replace the string
  306. "crt0.o" with "crt0+.o".  This strategy is defeated with one tm-*.h
  307. file includes a file defining LINK_SPEC.  I will fix this in release
  308. 1.35.1.  In the mean time, copy LINK_SPEC from the file that is being
  309. included, #undef it and redef it in the top level tm-*.h file.
  310.  
  311.  
  312. Michael Tieman
  313. tieman@lurch.stanford.edu
  314. 
  315. 1,,
  316. Return-Path: <dwf@lanl.gov>
  317. Received: by teacake.sun.com (4.0/SMI-4.0)
  318.     id AA01354; Sat, 3 Feb 90 09:02:12 PST
  319. Date: Sat, 3 Feb 90 09:02:12 PST
  320. From: dwf@lanl.gov (Dave Forslund)
  321. To: bug-g++@prep.ai.mit.edu
  322. Subject: HINTS
  323. Reply-To: tiemann@sun.com
  324. Status: R
  325.  
  326. *** EOOH ***
  327. Return-Path: <dwf@lanl.gov>
  328. Date: Sat, 3 Feb 90 09:02:12 PST
  329. From: dwf@lanl.gov (Dave Forslund)
  330. To: bug-g++@prep.ai.mit.edu
  331. Subject: HINTS
  332. Reply-To: tiemann@sun.com
  333.  
  334. I have successfully built G++ 1.35.0 on Sun3's and Sun4's running
  335. OS4.0.3. I have to make one change to the newld complation: -Dsun3 and
  336. -Dsun4 respectively in order to get the a.out.h info included
  337. correctly.  This is apparently a change in the header files from Sun.
  338. It shouldn't hurt earlier releases of the OS.  Also a similar problem
  339. occurs in libg++ compilation with the exec struct not being defined
  340. from the a.out.h file.  I had to add -D_CROSS_TARGET_ARCH=SUN4 to the
  341. compile line for test.hello.cc to get the dynamic linking to work.
  342.  
  343. David Forslund
  344. MS E531
  345. Los Alamos National Laboratory
  346. Los Alamos, NM 87545
  347. dwf@lanl.gov
  348.  
  349. 
  350. 1,,
  351. Return-Path: <hoptoad!gnu>
  352. Received: from sun.Sun.COM by teacake.sun.com (4.0/SMI-4.0)
  353.     id AA06643; Thu, 15 Feb 90 04:13:28 PST
  354. Received: from hoptoad.UUCP by sun.Sun.COM (4.1/SMI-4.1)
  355.     id AA01279; Thu, 15 Feb 90 04:10:55 PST
  356. Received: by hop.toad.com id AA05988; Thu, 15 Feb 90 01:44:58 PST
  357. Date: Thu, 15 Feb 90 01:44:58 PST
  358. From: hoptoad!gnu (John Gilmore)
  359. Message-Id: <9002150944.AA05988@hop.toad.com>
  360. To: tiemann@sun.com
  361. Subject: Re: [comp.sys.atari.st] Re: C++ on the ST
  362. In-Reply-To: your article <10908@stag.math.lsa.umich.edu>
  363. Status: O
  364.  
  365. *** EOOH ***
  366. Return-Path: <hoptoad!gnu>
  367. Date: Thu, 15 Feb 90 01:44:58 PST
  368. From: hoptoad!gnu (John Gilmore)
  369. To: tiemann@sun.com
  370. Subject: Re: [comp.sys.atari.st] Re: C++ on the ST
  371. In-Reply-To: your article <10908@stag.math.lsa.umich.edu>
  372.  
  373. Archive-name: atari-st-g++/08-Feb-90
  374. Original-posting-by: mwjester@wsucsa.uucp
  375. Original-subject: Re: C++ on the ST
  376. Archive-site: terminator.cc.umich.edu [35.1.33.8]
  377. Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti)
  378.  
  379. In article <451@pico.oz>, akenning@pico.oz (Alan Kennington) writes:
  380. > I'm amazed that I haven't seen any mention of C++ for the Atari ST.
  381. > Does anyone if there is such a thing? After all, the IBM PC has had it for
  382. > years now.
  383. > ak.
  384. FSF's GNU project C++ is available (in not fully-debugged form) from a couple
  385. of FTP'able sites -- terminator.cc.umich.edu is one -- but from all reports
  386. it requires at least 2Mbytes to run, 4M to do anything serious, so an unex-
  387. panded 1040ST is not enough.  If you have a Mega or have expanded your ST's
  388. memory, you might want to check it out.
  389.  
  390. --
  391. Max J
  392. mwjester@wsucsa
  393.  
  394. 
  395. 1,,
  396. Return-Path: <tiemann>
  397. Received: by teacake.sun.com (4.0/SMI-4.0)
  398.     id AA01354; Sat, 3 Feb 90 09:02:12 PST
  399. Date: Sat, 3 Feb 90 09:02:12 PST
  400. From: tiemann (Michael Tiemann)
  401. Message-Id: <9002031702.AA01354@teacake.sun.com>
  402. To: bug-g++@prep.ai.mit.edu
  403. Subject: HINTS
  404. Reply-To: tiemann@sun.com
  405. Status: R
  406.  
  407. *** EOOH ***
  408. Return-Path: <tiemann>
  409. Date: Sat, 3 Feb 90 09:02:12 PST
  410. From: tiemann (Michael Tiemann)
  411. To: bug-g++@prep.ai.mit.edu
  412. Subject: HINTS
  413. Reply-To: tiemann@sun.com
  414.  
  415. I saw this at Stanford:
  416.  
  417.     >From December's Reason magazine
  418.  
  419.     Rep. Bill Schuette (R-MI) recently advised constituents not to expect
  420.     all their problems to be solved by the federal government.  He warned
  421.     voters, "Congress is not the sole suppository of wisdom."
  422.  
  423. Michael
  424.  
  425. 
  426. 1,,
  427. Return-Path: <bug-g++-request@prep.ai.mit.edu>
  428. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  429.     id AA04317; Mon, 26 Feb 90 10:14:16 PST
  430. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  431.     id AA16343; Mon, 26 Feb 90 10:11:35 PST
  432. Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.0/AI-4.10) id AA17718; Mon, 26 Feb 90 13:10:59 EST
  433. Received: by tut.cis.ohio-state.edu (5.61-kk/5.900222)
  434.     id AA10639; Mon, 26 Feb 90 12:57:58 -0500
  435. Received: from USENET by tut.cis.ohio-state.edu with netnews
  436.     for bug-g++@prep.ai.mit.edu (bug-g++@prep.ai.mit.edu)
  437.     (contact usenet@tut.cis.ohio-state.edu if you have questions)
  438. Date: 26 Feb 90 11:21:06 GMT
  439. From: eutws1!wsinpdb@tuegate.tue.nl  (Paul de Bra)
  440. Organization: Eindhoven University of Technology, The Netherlands
  441. Subject: g++ for sVr3.2 on a 386
  442. Message-Id: <1551@tuegate.tue.nl>
  443. Sender: bug-g++-request@prep.ai.mit.edu
  444. To: bug-g++@prep.ai.mit.edu
  445. Status: RO
  446.  
  447. *** EOOH ***
  448. Return-Path: <bug-g++-request@prep.ai.mit.edu>
  449. Date: 26 Feb 90 11:21:06 GMT
  450. From: eutws1!wsinpdb@tuegate.tue.nl  (Paul de Bra)
  451. Organization: Eindhoven University of Technology, The Netherlands
  452. Subject: g++ for sVr3.2 on a 386
  453. Sender: bug-g++-request@prep.ai.mit.edu
  454. To: bug-g++@prep.ai.mit.edu
  455.  
  456.  
  457. Here is my list of changes to g++1.36.4 to get it working with
  458. AT&T System V release 3.2u.
  459.  
  460. First of all, let me state that this applies to g++1.36.4 only.
  461. An earlier attempt to get g++1.36.0 running failed miserably.
  462.  
  463. This list only indecates how to get g++ up and running if you already
  464. have gcc with the gnu assembler and gnu-ld running, and converted the
  465. libraries to gnu format. g++ will not work with the AT&T loader.
  466.  
  467. First do the make maketest but you have to create a directory config
  468. and links to the config files from gcc yourself as system v does not
  469. have symbolic links (yet).
  470.  
  471. Do config.g++ i386-sysv-gas
  472.  
  473. Makefile
  474. - do NOT define COFFFLAGS, as we do not use coff.
  475. - define INSTALL=cp and LINK=ln as indicated in the Makefile.
  476. - do not define CLIB=-lPW as gcc does not use it.
  477. - use MALLOC=malloc.o, just to be sure.
  478. - define all to be crt1+.o g++ cc1plus ld++ g++filt
  479.  
  480. cplus-dem.c
  481. - This file needs USG defined. I just put a define on line 1.
  482.   It obviously needs a better fix.
  483.  
  484. ld.c
  485. - you don't need sys/time.h and sys/resource.h (I just commented them
  486.   out, but you should use an ifdef).
  487.  
  488. malloc.c
  489. - needs defines from config.h, so include it. (This include is ifdef-ed
  490.   emacs, but shouldn't)
  491.  
  492. That's it.
  493. Type make and you're going...
  494.  
  495. Now, libg++ still has a few problems, for instance in String.h.
  496. Don't know yet what's needed to fix that.
  497.  
  498. Paul.
  499. (debra@research.att.com)
  500.  
  501. 
  502.  
  503. 1,,
  504. Return-Path: <bug-g++-request@prep.ai.mit.edu>
  505. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  506.     id AA15877; Thu, 1 Mar 90 21:51:05 PST
  507. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  508.     id AA07594; Thu, 1 Mar 90 21:48:10 PST
  509. Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.0/AI-4.10) id AA07136; Fri, 2 Mar 90 00:47:59 EST
  510. Received: by tut.cis.ohio-state.edu (5.61-kk/5.900222)
  511.     id AA14734; Fri, 2 Mar 90 00:33:08 -0500
  512. Received: from USENET by tut.cis.ohio-state.edu with netnews
  513.     for bug-g++@prep.ai.mit.edu (bug-g++@prep.ai.mit.edu)
  514.     (contact usenet@tut.cis.ohio-state.edu if you have questions)
  515. Date: 1 Mar 90 14:33:49 GMT
  516. From: @decwrl.dec.com@cis.ohio-state.edu  (Burkhard Neidecker-Lutz)
  517. Organization: Digital Equipment Corporation
  518. Subject: Configuration nit (unounderscore/NO_UNDER_SCORES)
  519. Message-Id: <9003011433.AA26235@decwrl.dec.com>
  520. Sender: bug-g++-request@prep.ai.mit.edu
  521. To: bug-g++@prep.ai.mit.edu
  522. Status: RO
  523.  
  524. *** EOOH ***
  525. Return-Path: <bug-g++-request@prep.ai.mit.edu>
  526. Date: 1 Mar 90 14:33:49 GMT
  527. From: @decwrl.dec.com@cis.ohio-state.edu  (Burkhard Neidecker-Lutz)
  528. Organization: Digital Equipment Corporation
  529. Subject: Configuration nit (unounderscore/NO_UNDER_SCORES)
  530. Sender: bug-g++-request@prep.ai.mit.edu
  531. To: bug-g++@prep.ai.mit.edu
  532.  
  533. Another configuration nit on a DECStation (g++ 1.37.0). cplus-dem.c and
  534. ld.c use "nounderscore", collect.c uses "NO_UNDER_SCORES" to express whether
  535. a particular assembler prepends underscores to symbols. most likely because
  536. of different authors. I tried to standardize this to NO_UNDER_SCORES, as 
  537. all uppercase names seem to be the norm for these kinds of configuration
  538. options. Now if somebody would please add NO_UNDER_SCORES to the appropriate
  539. config files...
  540.  
  541. *** cplus-dem.c    Thu Mar  1 12:50:02 1990
  542. --- cplus-dem.c.new    Thu Mar  1 12:50:13 1990
  543. ***************
  544. *** 43,50 ****
  545.      realloc except that they generate a fatal error if there is no
  546.      available memory. */
  547.   
  548. - /* #define nounderscore 1 /* define this is names don't start with _ */
  549.   #include <stdio.h>
  550.   #include <string.h>
  551.   #include <ctype.h>
  552. --- 43,48 ----
  553. ***************
  554. *** 182,188 ****
  555.   
  556.     if (type == NULL || *type == '\0')
  557.       return NULL;
  558. ! #ifndef nounderscore
  559.     if (*type++ != '_')
  560.       return NULL;
  561.   #endif
  562. --- 180,186 ----
  563.   
  564.     if (type == NULL || *type == '\0')
  565.       return NULL;
  566. ! #ifndef NO_UNDERSCORES
  567.     if (*type++ != '_')
  568.       return NULL;
  569.   #endif
  570. *** ld.c    Thu Mar  1 13:02:00 1990
  571. --- ld.c.new    Thu Mar  1 13:02:10 1990
  572. ***************
  573. *** 98,106 ****
  574.   
  575.   /* System dependencies */
  576.   
  577. - /* Define this if names etext, edata and end should not start with `_'.  */
  578. - /* #define nounderscore 1 */
  579.   /* Define NON_NATIVE if using BSD or pseudo-BSD file format on a system
  580.      whose native format is different.  */
  581.   /* #define NON_NATIVE */
  582. --- 98,103 ----
  583. ***************
  584. *** 335,341 ****
  585.   #define    MAX_ALIGNMENT    (sizeof (int))
  586.   #endif
  587.   
  588. ! #ifdef nounderscore
  589.   #define LPREFIX '.'
  590.   #else
  591.   #define LPREFIX 'L'
  592. --- 332,338 ----
  593.   #define    MAX_ALIGNMENT    (sizeof (int))
  594.   #endif
  595.   
  596. ! #ifdef NO_UNDER_SCORES
  597.   #define LPREFIX '.'
  598.   #else
  599.   #define LPREFIX 'L'
  600. ***************
  601. *** 4426,4432 ****
  602.   void
  603.   symtab_init ()
  604.   {
  605. ! #ifndef nounderscore
  606.     edata_symbol = getsym ("_edata");
  607.     etext_symbol = getsym ("_etext");
  608.     end_symbol = getsym ("_end");
  609. --- 4423,4429 ----
  610.   void
  611.   symtab_init ()
  612.   {
  613. ! #ifndef NO_UNDER_SCORES
  614.     edata_symbol = getsym ("_edata");
  615.     etext_symbol = getsym ("_etext");
  616.     end_symbol = getsym ("_end");
  617.  
  618. 
  619. 1,,
  620. Return-Path: <@eddie.mit.edu:mcgill-vision!icule!pinard@EDDIE.MIT.EDU>
  621. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  622.     id AA16314; Fri, 2 Mar 90 21:09:38 PST
  623. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  624.     id AA14100; Fri, 2 Mar 90 21:06:53 PST
  625. Received: from EDDIE.MIT.EDU by life.ai.mit.edu (4.0/AI-4.10) id AA25012; Sat, 3 Mar 90 00:06:31 EST
  626. Received:  by EDDIE.MIT.EDU with UUCP (5.61/25-eef)
  627.     id AA20462; Sat, 3 Mar 90 00:06:14 EST
  628. Received: from icule by Larry.McRCIM.McGill.EDU (5.61) with UUCP
  629.     id <9003030503.AA14621@Larry.McRCIM.McGill.EDU>; Sat, 3 Mar 90 00:03:30 -0500
  630. Received: by icule.UUCP (5.51/smail2.5/02-04-90)
  631.     id AA05967; Sat, 3 Mar 90 00:04:05 EST
  632. Date: Sat, 3 Mar 90 00:04:05 EST
  633. From: mcgill-vision!icule!pinard@eddie.mit.edu (Francois Pinard)
  634. Message-Id: <9003030504.AA05967@icule.UUCP>
  635. To: mit-eddie!prep.ai.mit.edu!bug-gcc@eddie.mit.edu,
  636.         mit-eddie!prep.ai.mit.edu!bug-gnu-utils@eddie.mit.edu
  637. Subject: GCC 1.37.1 installation report for 386/ix
  638. Reply-To: mcgill-vision!iro.umontreal.ca!pinard@eddie.mit.edu
  639. Status: RO
  640.  
  641. *** EOOH ***
  642. Return-Path: <@eddie.mit.edu:mcgill-vision!icule!pinard@EDDIE.MIT.EDU>
  643. Date: Sat, 3 Mar 90 00:04:05 EST
  644. From: mcgill-vision!icule!pinard@eddie.mit.edu (Francois Pinard)
  645. To: mit-eddie!prep.ai.mit.edu!bug-gcc@eddie.mit.edu,
  646.         mit-eddie!prep.ai.mit.edu!bug-gnu-utils@eddie.mit.edu
  647. Subject: GCC 1.37.1 installation report for 386/ix
  648. Reply-To: mcgill-vision!iro.umontreal.ca!pinard@eddie.mit.edu
  649.  
  650. [This message is sent to both bug-gcc and bug-gnu-utils.]
  651.  
  652. I got gcc 1.37.1 running on 386/ix, using gas and COFF encapsulation.
  653. The following details might be worth mentioning in the documentation,
  654. or the installation Makefile could even be made to handle them.
  655.  
  656. * The first `make' prepares gnulib and adds gnulib2 to gnulib in the
  657. same blow.  In fact, the `libconvert gnulib' should ideally be done
  658. after the first gnulib is made and before gnulib2 is added to gnulib,
  659. `inside' point 5. of INSTALL document, not in point 6.
  660.  
  661. * The stock ar, given by the AR macro in the Makefile, is ok for
  662. gnulib preparation.  For gnulib2 preparation however, the binutils' AR
  663. is preferable.
  664.  
  665. * Stage1 with cc requires something like CLIB=-lPW.  But subsequent
  666. stages with gcc require that CLIB=.
  667.  
  668. * Option `-g' on `make CC=stage1/...' and `make CC=stage2/...'  is not
  669. good, at least because libg.a has not been converted.  Should it be?
  670.  
  671. * After stage3, the comparison procedure suggested in point 9. of
  672. INSTALL uses `tail +10 $file'.  Was rather `tail +10c $file' meant?  A
  673. few files did not pass this test: gcc.o, obstack.o and version.o.
  674.  
  675. * The binutils' README-ENCAP should be revised, at least on the
  676. following points:
  677.  
  678.    * `(There is no debugger support yet...)'.  This note could be
  679.    removed: gdb 3.5 interfaces very nicely with gcc 1.37.1.
  680.  
  681.    * i386gnu should be replaced by i386-sysv-gas.
  682.  
  683.    * The outlined installation is wholly correct, but slightly fuzzy
  684.    on details.  Maybe this could be straighten up.  (I have the
  685.    feeling that the README-ENCAP could be taken over by gcc's INSTALL
  686.    file).
  687.  
  688. ----------
  689. I feel like saying that gcc 1.37.1 works very satisfactorily for the
  690. many usages I made of it today.  The whole package is a wonder.
  691.  
  692. -- 
  693. Franc,ois Pinard          ``Vivement GNU!''         pinard@iro.umontreal.ca
  694. (514) 588-4656    cp 886 L'Epiphanie (Qc) J0K 1J0    ...!uunet!iros1!pinard
  695.  
  696. 
  697. 1,,
  698. Return-Path: <jclark!jjc@relay.eu.net>
  699. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  700.     id AA08166; Sun, 4 Mar 90 15:45:47 PST
  701. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  702.     id AA19976; Sun, 4 Mar 90 15:43:05 PST
  703. Received: from mcsun.EU.net by life.ai.mit.edu (4.0/AI-4.10) id AA12107; Sun, 4 Mar 90 18:42:41 EST
  704. Received: by mcsun.EU.net via EUnet; Mon, 5 Mar 90 00:42:33 +0100 (MET)
  705. Received: from slxsys by kestrel.Ukc.AC.UK   with UUCP  id aa16691;
  706.           4 Mar 90 23:36 GMT
  707. Received: from jclark by specialix.co.uk id aa14374; Sun, 4 Mar 90 23:27:31 GMT
  708. Received: from yquem.jclark.uucp by jclark.uucp (4.0/SMI-4.0)
  709.     id AA05677; Sun, 4 Mar 90 23:07:09 GMT
  710. Date: Sun, 4 Mar 90 23:07:08 GMT
  711. From: James Clark <jclark!jjc@relay.eu.net>
  712. Message-Id: <9003042307.AA05677@jclark.uucp>
  713. Received: by yquem.jclark.uucp (4.0/SMI-4.0)
  714.     id AA10645; Sun, 4 Mar 90 23:06:57 GMT
  715. To: bug-g++@prep.ai.mit.edu
  716. Subject: g++ 1.37.1 on 386/ix
  717. Status: RO
  718.  
  719. *** EOOH ***
  720. Return-Path: <jclark!jjc@relay.eu.net>
  721. Date: Sun, 4 Mar 90 23:07:08 GMT
  722. From: James Clark <jclark!jjc@relay.eu.net>
  723. To: bug-g++@prep.ai.mit.edu
  724. Subject: g++ 1.37.1 on 386/ix
  725.  
  726. I encountered a couple of glitches installing g++ 1.37.1 on 386/ix
  727. (essentially System V/3.2). I used the coff encapsulation
  728. configuration i386g.
  729.  
  730. 1. make-links.g++ attempts to link ../gcc/config to ./config like this:
  731.  
  732. $symbolic_link ${CDIR} ./config 2>/dev/null || $hard_link ${CDIR} ./config
  733. if [ ! -r ${CDIR} ]
  734. then
  735.     echo "$progname: unable to link \`${CDIR}'."
  736.     exit 1
  737. fi
  738.  
  739. System V doesn't have soft links and won't hard link directories;
  740. so this doesn't work. Also, the test
  741.  
  742. if [ ! -r ${CDIR} ]
  743.  
  744. should presumably be
  745.  
  746. if [ ! -r ./config ]
  747.  
  748. I just did
  749.  
  750. mkdir config
  751. ln ../gcc/config/* config
  752.  
  753. 2. cplus-dem.c needs USG defined somehow.
  754.  
  755. 3. ld.c needs a.out.{encap,gnu}.h from the binutils distribution.
  756. Perhaps these should be included with g++, just as they are with gdb.
  757.  
  758. 4. I had to make a couple of small changes to ld.c.
  759.  
  760. *** /usr/local/g++/ld.c Sun Mar  4 15:06:45 1990
  761. --- ld.c        Sun Mar  4 22:41:21 1990
  762. ***************
  763. *** 45,51 ****
  764. --- 45,53 ----
  765.   #include <sys/stat.h>
  766.   #include <sys/file.h>
  767.   #include <sys/time.h>
  768. + #ifndef USG
  769.   #include <sys/resource.h>
  770. + #endif
  771.   #ifndef sony_news
  772.   #include <fcntl.h>
  773.   #endif
  774. ***************
  775. *** 4746,4752 ****
  776.  
  777.   #endif
  778.  
  779. ! #if TARGET == SUN4
  780.  
  781.   /* Don't use local pagesize to build for Sparc.  */
  782.  
  783. --- 4748,4754 ----
  784.  
  785.   #endif
  786.  
  787. ! #if defined(sun) && (TARGET == SUN4)
  788.  
  789.   /* Don't use local pagesize to build for Sparc.  */
  790.  
  791. 5. This has nothing to do with the 386. Might it not be a good idea to
  792. include xyzzy.cc from libg++/src in the g++ distribution? gnulib3.c is
  793. included and it depends upon xyzzy.cc.
  794.  
  795. James Clark
  796. jjc@jclark.uucp
  797.  
  798. 
  799. 1,,
  800. Return-Path: <dl@g.oswego.edu>
  801. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  802.     id AA17185; Sat, 10 Mar 90 04:11:22 PST
  803. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  804.     id AA09729; Sat, 10 Mar 90 04:08:40 PST
  805. Received: from oswego.Oswego.EDU by life.ai.mit.edu (4.0/AI-4.10) id AA27241; Sat, 10 Mar 90 07:08:10 EST
  806. Received: by oswego.Oswego.EDU (5.57/Osw4.1.21)
  807.     id AA01343; Sat, 10 Mar 90 07:02:10 EST
  808. Received: by g.oswego.edu (4.0/SMI-4.0)
  809.     id AA18216; Sat, 10 Mar 90 07:11:22 EST
  810. Date: Sat, 10 Mar 90 07:11:22 EST
  811. From: dl@g.oswego.edu (Doug Lea)
  812. Message-Id: <9003101211.AA18216@g.oswego.edu>
  813. To: newton%CAD.MCC.COM@nisc.nyser.net
  814. Cc: bug-lib-g++@prep.ai.mit.edu
  815. In-Reply-To: Dave Newton's message of Fri, 9 Mar 90 10:35:52 CST <9003091635.AA14109@suntrek.cad.mcc.com>
  816. Subject: lib g++ problem
  817. Reply-To: dl@oswego.oswego.edu
  818. Status: O
  819.  
  820. *** EOOH ***
  821. Return-Path: <dl@g.oswego.edu>
  822. Date: Sat, 10 Mar 90 07:11:22 EST
  823. From: dl@g.oswego.edu (Doug Lea)
  824. To: newton%CAD.MCC.COM@nisc.nyser.net
  825. Cc: bug-lib-g++@prep.ai.mit.edu
  826. In-Reply-To: Dave Newton's message of Fri, 9 Mar 90 10:35:52 CST <9003091635.AA14109@suntrek.cad.mcc.com>
  827. Subject: lib g++ problem
  828. Reply-To: dl@oswego.oswego.edu
  829.  
  830.  
  831. The libg++/src/gnulib3.c support for on_exit was commented out by me
  832. (see libg++/ChangeLog) after discovering that it did not always
  833. correctly work with g++/libg++, at least on SunOS4. The most obvious
  834. symptom is that it manages to internally invoke libc versions of some
  835. functions, ignoring libg++ overrides. This appears to be a linker
  836. issue: If nothing in your program calls one of the few libg++
  837. functions, say f, that have the same name as a libc function f, then
  838. during the `-lc' part of the link, some C function that calls f will
  839. use the libc f. According to ANSI C, libg++ probably should not be
  840. redefining libc functions in this way, but pragmatics seem to force it
  841. (for example, with libg++ malloc, free, realloc).  I did not get a
  842. chance to follow up on this to find a better solution before release.
  843.  
  844. In general, the on_exit approach to cleanup is slightly incongruous with
  845. the notion of global destructors. For example, if you have both, which
  846. should be done first?
  847.  
  848. -Doug
  849.  
  850. 
  851. 1,,
  852. Return-Path: <bug-g++-request@prep.ai.mit.edu>
  853. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  854.     id AA14510; Tue, 6 Mar 90 10:31:03 PST
  855. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  856.     id AA27979; Tue, 6 Mar 90 10:28:23 PST
  857. Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.0/AI-4.10) id AA12942; Tue, 6 Mar 90 13:28:00 EST
  858. Received: by tut.cis.ohio-state.edu (5.61-kk/5.900222)
  859.     id AA04421; Tue, 6 Mar 90 13:19:31 -0500
  860. Received: from USENET by tut.cis.ohio-state.edu with netnews
  861.     for bug-g++@prep.ai.mit.edu (bug-g++@prep.ai.mit.edu)
  862.     (contact usenet@tut.cis.ohio-state.edu if you have questions)
  863. Date: 6 Mar 90 18:04:36 GMT
  864. From: hartzell@boulder.colorado.edu  (George Hartzell)
  865. Organization: MCD Biology, University of Colorado, Boulder
  866. Subject: Re: g++ doesn't know about __DTOR_TABLE__, __CTOR_TABLE__
  867. Message-Id: <17841@boulder.Colorado.EDU>
  868. References: <9003061024.AA18097@spica.ucsc.edu>, <53398@bu.edu.bu.edu>
  869. Sender: bug-g++-request@prep.ai.mit.edu
  870. To: bug-g++@prep.ai.mit.edu
  871. Status: RO
  872.  
  873. *** EOOH ***
  874. Return-Path: <bug-g++-request@prep.ai.mit.edu>
  875. Date: 6 Mar 90 18:04:36 GMT
  876. From: hartzell@boulder.colorado.edu  (George Hartzell)
  877. Organization: MCD Biology, University of Colorado, Boulder
  878. Subject: Re: g++ doesn't know about __DTOR_TABLE__, __CTOR_TABLE__
  879. References: <9003061024.AA18097@spica.ucsc.edu>, <53398@bu.edu.bu.edu>
  880. Sender: bug-g++-request@prep.ai.mit.edu
  881. To: bug-g++@prep.ai.mit.edu
  882.  
  883. In article <53398@bu.edu.bu.edu>, oneill@bass (Brian V O'Neill) writes:
  884. >
  885. >Something has changed which probably shouldn't have...
  886. >
  887.  
  888. Do you have NO_UNDERSCORES properly (un)defined?  Are you using
  889. collect?  If so, compile something with g++ -v, and stop it after
  890. collect runs, but before as finishes assembling collect's output.
  891. Look at collect's output and make sure that it is generating the
  892. correct symbol names.
  893. g.
  894. George Hartzell                              (303) 492-4535
  895.  MCD Biology, University of Colorado-Boulder, Boulder, CO 80309
  896. hartzell@Boulder.Colorado.EDU           ..!ncar!boulder!hartzell
  897.  
  898. 
  899. 1,,
  900. Return-Path: <ngo%tammy@harvard.harvard.edu>
  901. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  902.     id AA23436; Mon, 12 Mar 90 05:44:17 PST
  903. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  904.     id AA19130; Mon, 12 Mar 90 05:41:36 PST
  905. Received: from harvard.harvard.edu by life.ai.mit.edu (4.0/AI-4.10) id AA17910; Mon, 12 Mar 90 08:41:23 EST
  906. Message-Id: <9003121341.AA17910@life.ai.mit.edu>
  907. Received: by harvard.harvard.edu (5.54/a0.25)
  908.     (for bug-g++@ai.mit.edu) id AA22022; Mon, 12 Mar 90 08:42:39 EST
  909. Received: by tammy.HARVARD.EDU; Mon, 12 Mar 90 08:40:55 EST
  910. To: bug-g++@ai.mit.edu
  911. Cc: ngo@harvard.harvard.edu, adc@frith.egr.msu.edu, gillis@aero.aerospace.org
  912. Subject: Re: Installing g++ on a Convex 
  913. In-Reply-To: Your message of Mon, 12 Mar 90 07:10:39 -0500.
  914. Date: Mon, 12 Mar 90 08:40:54 -0500
  915. From: ngo%tammy@harvard.harvard.edu
  916. Status: RO
  917.  
  918. *** EOOH ***
  919. Return-Path: <ngo%tammy@harvard.harvard.edu>
  920. To: bug-g++@ai.mit.edu
  921. Cc: ngo@harvard.harvard.edu, adc@frith.egr.msu.edu, gillis@aero.aerospace.org
  922. Subject: Re: Installing g++ on a Convex 
  923. In-Reply-To: Your message of Mon, 12 Mar 90 07:10:39 -0500.
  924. Date: Mon, 12 Mar 90 08:40:54 -0500
  925. From: ngo%tammy@harvard.harvard.edu
  926.  
  927.  
  928. In an earlier message, Alan Cabrera wrote:
  929.  
  930. adc> I'm attempting to install g++ 1.37.0 on a Convex C2.
  931.  
  932. Take heart--we've got it running on a Convex C2, as well.  Thanks to
  933. Michael Tiemann and Jim Gillis.
  934.  
  935. adc> I setup my Makefile to use COFF and COFF_COLLECT.
  936.  
  937. You should not use any of the COFFLAGS with collect2.  They are only
  938. used with collect.
  939.  
  940. adc> I change the line
  941. adc>     all: g++ cc1plus collect # crt0+.o crt1+.o
  942. adc> to
  943. adc>     all: g++ cc1plus collect2 # crt0+.o crt1+.o
  944.  
  945. Yes, that's correct.
  946.  
  947. adc>     ld: ERROR - Library 'libg++.a' not found
  948. adc>     ld: No executable produced.
  949.  
  950. In the Makefiles for g++ and libg++, you'll find the variable "prefix"
  951. set to /usr/local and /usr/gnu in the respective distributions.  These
  952. should be the same for g++ to be able to find libg++.a.
  953.  
  954. adc> I add a -L/mnt/adc/lib, this is where libg++.a is, recompile and get:
  955.  
  956. That's equivalent to setting prefix equal to /mnt/adc/lib in the g++
  957. Makefile, I believe.
  958.  
  959. adc>     g++: installation problem, cannot exec collect: No such file
  960. adc> or directory
  961. adc> 
  962. adc> Have I done something wrong in installing g++?
  963.  
  964. Yes... this is from using COFFLAGS.  The correct usage is *not* to use
  965. COFFLAGS.  "collect2" is a misnomer; it should really have been called
  966. "ld-hack" or something like that.  It is a replacement for ld.  The
  967. Makefile automatically installs it as /mnt/adc/gcc-ld; you shouldn't
  968. need not do anything more except for comment out COFFLAGS.
  969.  
  970. Keep in touch--
  971.  
  972. --Tom Ngo
  973.   ngo@harvard.harvard.edu
  974.  
  975.  
  976. 
  977. 1,,
  978. Return-Path: <info-g++-request@prep.ai.mit.edu>
  979. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  980.     id AA25193; Fri, 16 Mar 90 22:35:58 PST
  981. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  982.     id AA13343; Fri, 16 Mar 90 22:33:15 PST
  983. Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.0/AI-4.10) id AA16812; Fri, 16 Mar 90 12:17:45 EST
  984. Received: by tut.cis.ohio-state.edu (5.61-kk/5.900314)
  985.     id AA00613; Thu, 15 Mar 90 21:50:05 -0500
  986. Received: from USENET by tut.cis.ohio-state.edu with netnews
  987.     for info-g++@prep.ai.mit.edu (info-g++@prep.ai.mit.edu)
  988.     (contact usenet@tut.cis.ohio-state.edu if you have questions)
  989. Date: 16 Mar 90 02:11:41 GMT
  990. From: chin@operations.dccs.upenn.edu  (Chin Wu)
  991. Organization: University of Pennsylvania, Philadelphia, PA
  992. Subject: RE: g++ on SGI iris
  993. Message-Id: <CHIN.90Mar15211141@sg1.chem.upenn.edu>
  994. Sender: info-g++-request@prep.ai.mit.edu
  995. To: info-g++@prep.ai.mit.edu
  996. Status: RO
  997.  
  998. *** EOOH ***
  999. Return-Path: <info-g++-request@prep.ai.mit.edu>
  1000. Date: 16 Mar 90 02:11:41 GMT
  1001. From: chin@operations.dccs.upenn.edu  (Chin Wu)
  1002. Organization: University of Pennsylvania, Philadelphia, PA
  1003. Subject: RE: g++ on SGI iris
  1004. Sender: info-g++-request@prep.ai.mit.edu
  1005. To: info-g++@prep.ai.mit.edu
  1006.  
  1007. Hi,
  1008.     You should use collect.c instead of ld.c.
  1009.  
  1010. >>  COFFLAGS = -DUSE_COLLECT -DEXTENDED_COFF
  1011.  
  1012. >> # On COFF systems, use the target below.
  1013. >> all: g++ cc1plus collect # crt0+.o crt1+.o
  1014.  
  1015.  
  1016. chin@sg1.chem.upenn.edu
  1017.  
  1018. 
  1019. 1,,
  1020. Return-Path: <info-g++-request@prep.ai.mit.edu>
  1021. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  1022.     id AA26267; Tue, 20 Mar 90 06:40:22 PST
  1023. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  1024.     id AA02785; Tue, 20 Mar 90 06:37:40 PST
  1025. Received: from aeneas.MIT.EDU by life.ai.mit.edu (4.0/AI-4.10) id AA07522; Tue, 20 Mar 90 09:36:54 EST
  1026. Received: from tut.cis.ohio-state.edu by aeneas.MIT.EDU (5.61/4.7) id AA22389; Tue, 20 Mar 90 07:18:50 -0500
  1027. Received: by tut.cis.ohio-state.edu (5.61-kk/5.900319)
  1028.     id AA14406; Tue, 20 Mar 90 07:05:39 -0500
  1029. Received: from USENET by tut.cis.ohio-state.edu with netnews
  1030.     for info-g++@prep.ai.mit.edu (info-g++@prep.ai.mit.edu)
  1031.     (contact usenet@tut.cis.ohio-state.edu if you have questions)
  1032. Date: 20 Mar 90 10:37:15 GMT
  1033. From: tuewsd!wsinpdb@tuegate.tue.nl  (Paul de Bra)
  1034. Organization: Eindhoven University of Technology, The Netherlands
  1035. Subject: g++ for 386
  1036. Message-Id: <1007@tuewsd.lso.win.tue.nl>
  1037. Sender: info-g++-request@prep.ai.mit.edu
  1038. To: info-g++@prep.ai.mit.edu
  1039. Status: R
  1040.  
  1041. *** EOOH ***
  1042. Return-Path: <info-g++-request@prep.ai.mit.edu>
  1043. Date: 20 Mar 90 10:37:15 GMT
  1044. From: tuewsd!wsinpdb@tuegate.tue.nl  (Paul de Bra)
  1045. Organization: Eindhoven University of Technology, The Netherlands
  1046. Subject: g++ for 386
  1047. Sender: info-g++-request@prep.ai.mit.edu
  1048. To: info-g++@prep.ai.mit.edu
  1049.  
  1050. As promised, here is all the info you need to get the latest g++
  1051. up and running on a 386 with System V (I only tried AT&T, but that
  1052. should not matter as everything is compiled with the GNU compiler anyway)
  1053.  
  1054. How to get g++ (1.37.1) running on a 386 with system V.
  1055. -------------------------------------------------------
  1056.  
  1057. First get gcc 1.37.1 running, using the i386-sysv-gas config.
  1058. (this requires that you also have gas and the binutils running)
  1059.  
  1060. - edit the makefile to specify the correct names for directories,
  1061.   to set LINK=ln, INSTALL=cp, do not include malloc.o, and do
  1062.   not specify anything that relates to COFF as we don't use COFF,
  1063.   but rather the coff encapsulation.
  1064.  
  1065. - make sure you say MALLOC=malloc.o in the Makefile, as g++ will
  1066.   sometimes dump when used with the standard malloc. this may be
  1067.   a bug in g++ instead of malloc, don't know.
  1068.  
  1069. - make a config directory. then type make maketest.
  1070.   you should not get any fatal errors.
  1071.  
  1072. - config.g++ i386-sysv-gas
  1073.  
  1074. - in cplus-dem.c, #include "config.h" before the #ifdef USG.
  1075.  
  1076. - copy a.out.encap.h and a.out.gnu.h from the binutils.
  1077.  
  1078. - in ld.c, remove include sys/time.h and sys/resource.h with an ifdef
  1079. - at the end of ld.c, add an ifdef sun around the definition of
  1080.   getpagesize for SUN4.
  1081.  
  1082. - type "make" and wait. finish with make install and you're all set.
  1083.  
  1084. How to get libg++ (1.37.0) running with g++ 1.37.1 on the 386.
  1085. --------------------------------------------------------------
  1086.  
  1087. First make sure you have gcc and g++ 1.37.1 running, both configured
  1088. with i386-sysv-gas.
  1089.  
  1090. - edit the makefile to specify the correct names for directories,
  1091.   in particular set PWD to the current dir, check the prefix, which is
  1092.   different between the Makefile for g++ and for libg++ (for reasons
  1093.   that escape me), set OSFLAGS=-DUSG, XTRAFLAGS=-DCOFF_ENCAPSULATE,
  1094.   INSTALL=cp.
  1095.  
  1096. - don't forget to also edit the Makefile in the src directory.
  1097.  
  1098. - remove (uncomment) line 222 of src/malloc.c. it redeclares fprintf.
  1099.  
  1100. - rename libgxx_io_ob.cc to libgxx_io_ob.C, and change the Makefile
  1101.   accordingly. the name libgxx_io_ob.cc is truncated to libgxx_io_ob.c
  1102.   so the g++ compiler thinks it's just an ordinary c file.
  1103.   This also involves adding .C to the .SUFFIXES list (in the Makefile)
  1104.   and adding the rule
  1105.   .C.o:
  1106.           $(GXX) $(GXXFLAGS) -c  $<
  1107.  
  1108. - type "make src" to build libg++, "make install" to install it.
  1109.  
  1110. - if you want to run the tests, define PAGSIZ=4096 in test.hello.cc
  1111.   to avoid calling the non-existent getpagesize() function.
  1112.  
  1113. - several test programs don't work. something is still wrong, but some
  1114.   programs do work.
  1115.  
  1116. Enjoy!
  1117.  
  1118. Paul.
  1119. (debra@research.att.com)
  1120.  
  1121. 
  1122. 1,,
  1123. Return-Path: <bug-gdb-request@prep.ai.mit.edu>
  1124. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.0/SMI-4.0)
  1125.     id AA02786; Sat, 3 Mar 90 18:30:38 PST
  1126. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  1127.     id AA16824; Sat, 3 Mar 90 18:27:58 PST
  1128. Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.0/AI-4.10) id AA04213; Sat, 3 Mar 90 21:27:41 EST
  1129. Received: by tut.cis.ohio-state.edu (5.61-kk/5.900222)
  1130.     id AA00799; Sat, 3 Mar 90 21:14:41 -0500
  1131. Received: from USENET by tut.cis.ohio-state.edu with netnews
  1132.     for bug-gdb@prep.ai.mit.edu (bug-gdb@prep.ai.mit.edu)
  1133.     (contact usenet@tut.cis.ohio-state.edu if you have questions)
  1134. Date: 4 Mar 90 01:15:56 GMT
  1135. From: hartzell@boulder.colorado.edu  (George Hartzell)
  1136. Organization: University of Colorado, Boulder
  1137. Subject: gdb on MIPS (non-DECstation)
  1138. Message-Id: <17717@boulder.Colorado.EDU>
  1139. Sender: bug-gdb-request@prep.ai.mit.edu
  1140. To: bug-gdb@prep.ai.mit.edu
  1141. Status: RO
  1142.  
  1143. *** EOOH ***
  1144. Return-Path: <bug-gdb-request@prep.ai.mit.edu>
  1145. Date: 4 Mar 90 01:15:56 GMT
  1146. From: hartzell@boulder.colorado.edu  (George Hartzell)
  1147. Organization: University of Colorado, Boulder
  1148. Subject: gdb on MIPS (non-DECstation)
  1149. Sender: bug-gdb-request@prep.ai.mit.edu
  1150. To: bug-gdb@prep.ai.mit.edu
  1151.  
  1152. After applying Per Bothner's mips patches to the gdb3.5 sources, the
  1153. following "trivial" fix to munch will produce a working (so far,
  1154. anyway.  I haven't tried much) version of gdb on my MIPS M-2000 in the
  1155. BSD environment.  The problem is that the default behavior for nm is
  1156. system V, so we need to add the -B arguement to force BSD behavior.
  1157.  
  1158. Maybe MIPS could make a /bsd43/bin/nm that defaulted to the BSD
  1159. behaviour!!! 
  1160.  
  1161. Change:
  1162.     nm -p $* | egrep 'T *_?_initialize_' | \
  1163. to:
  1164.     nm -B -p $* | egrep 'T *_?_initialize_' | \
  1165.  
  1166. Here is the complete script:
  1167. #! /bin/sh
  1168.  
  1169. # create an initialization procedure from a list of .o files
  1170.  
  1171. echo '/* Do not modify this file.  It is created automatically by "munch". */'
  1172. echo 'void initialize_all_files () {'
  1173.  
  1174. if test "$1" = "-DSYSV" ; then
  1175.     shift;
  1176.     nm $* | egrep '^(.*[^a-zA-Z_]_|_)initialize_' | \
  1177.     sed -e 's/^.*\(_initialize_[a-zA-Z0-9_]*\)[^a-zA-Z0-9_].*$/   \1 ();/'
  1178. else
  1179.     nm -B -p $* | egrep 'T *_?_initialize_' | \
  1180.     sed -e 's/^.*T *_*\(.*\)/    _\1 ();/'
  1181. fi
  1182.  
  1183. echo '}'
  1184.  
  1185.  
  1186.  
  1187. George Hartzell                              (303) 492-4535
  1188.  MCD Biology, University of Colorado-Boulder, Boulder, CO 80309
  1189. hartzell@Boulder.Colorado.EDU           ..!ncar!boulder!hartzell
  1190.  
  1191. 
  1192. 1,,
  1193. Return-Path: <info-g++-request@prep.ai.mit.edu>
  1194. Received: from Sun.COM (sun-barr.EBay.Sun.COM) by teacake.Eng.Sun.COM (4.1/SMI-4.1)
  1195.     id AA00591; Thu, 19 Apr 90 14:26:14 PDT
  1196. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  1197.     id AA13462; Thu, 19 Apr 90 14:23:15 PDT
  1198. Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.1/AI-4.10) id AA15940; Thu, 19 Apr 90 17:21:17 EDT
  1199. Received: by tut.cis.ohio-state.edu (5.61-kk/5.900417)
  1200.     id AA20139; Thu, 19 Apr 90 15:20:14 -0400
  1201. Received: from USENET by tut.cis.ohio-state.edu with netnews
  1202.     for info-g++@prep.ai.mit.edu (info-g++@prep.ai.mit.edu)
  1203.     (contact usenet@tut.cis.ohio-state.edu if you have questions)
  1204. Date: 19 Apr 90 19:06:32 GMT
  1205. From: pjg@osf.org  (Paulo Guedes)
  1206. Organization: Open Software Foundation
  1207. Subject: g++ on Mach 2.5 (i386)
  1208. Message-Id: <6843@paperboy.OSF.ORG>
  1209. Sender: info-g++-request@prep.ai.mit.edu
  1210. To: info-g++@prep.ai.mit.edu
  1211. Status: R
  1212.  
  1213. *** EOOH ***
  1214. Return-Path: <info-g++-request@prep.ai.mit.edu>
  1215. Date: 19 Apr 90 19:06:32 GMT
  1216. From: pjg@osf.org  (Paulo Guedes)
  1217. Organization: Open Software Foundation
  1218. Subject: g++ on Mach 2.5 (i386)
  1219. Sender: info-g++-request@prep.ai.mit.edu
  1220. To: info-g++@prep.ai.mit.edu
  1221.  
  1222. I recently installed g++ 1.37.1 on Mach 2.5 (i386). This instalation
  1223. assumes you have the gcc sources (which make part of the Mach 2.5
  1224. (i386) distribution) on the directory "../gcc", as g++ uses most
  1225. of the gcc back-end files.
  1226.  
  1227. The instalation of the compiler should run without problems. To
  1228. install the g++ library, file g++-include/math.h must be changed
  1229. because it triggers an error in the C library (atof causes core dump
  1230. for values greater then MAXFLOAT). See the diff file. After these
  1231. changes all the library should install without problems. Notice,
  1232. however, that the execution of some of the test files will fail if
  1233. executed from a non-privileged account (some of them try to write
  1234. on "/dev/tty" which is normaly protected on the standard Mach 2.5
  1235. (i386) distribution).
  1236.  
  1237. Paulo
  1238.  
  1239. ---
  1240. Paulo Guedes     Open Software Foundation   11 Cambridge Center, Cambridge, MA
  1241. Email: pjg@osf.osf.org    Phone: (617) 621-8878
  1242.  
  1243. -------------------------------------------------------------------------
  1244. Next follow TWO diff files for g++ and libg++.
  1245.  
  1246. Diff file for g++-1.37.1
  1247. -------------------------------------------------------------------------
  1248. Only in g++: .gdbinit
  1249. Only in g++-1.37.1: DIFF
  1250. Only in g++-1.37.1: DIFFS
  1251. Only in g++-1.37.1: DIFFS.bak
  1252. diff -rc2 g++-1.37.1/Makefile g++/Makefile
  1253. *** g++-1.37.1/Makefile    Mon Feb 26 09:37:46 1990
  1254. --- g++/Makefile    Tue Apr 17 18:42:00 1990
  1255. ***************
  1256. *** 44,51 ****
  1257.   # /usr/include/unistd.h.  If this is the case for your system
  1258.   # uncomment the following line.
  1259. ! # HAVE_UNISTD_H = -DNO_UNISTD_H
  1260.   
  1261.   # CFLAGS = -g -DSOS -DESKIT -O
  1262. ! CFLAGS = -g -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc-test/
  1263.   CC = gcc
  1264.   BISON = bison
  1265. --- 44,51 ----
  1266.   # /usr/include/unistd.h.  If this is the case for your system
  1267.   # uncomment the following line.
  1268. ! HAVE_UNISTD_H = -DNO_UNISTD_H
  1269.   
  1270.   # CFLAGS = -g -DSOS -DESKIT -O
  1271. ! CFLAGS = -g -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc/
  1272.   CC = gcc
  1273.   BISON = bison
  1274. ***************
  1275. *** 75,79 ****
  1276.   
  1277.   prefix=/usr/local
  1278.   # Directory where sources are, from where we are.
  1279.   srcdir = .
  1280. --- 75,78 ----
  1281. ***************
  1282. *** 90,94 ****
  1283.   
  1284.   # Additional system libraries to link with.
  1285. ! CLIB=
  1286.   
  1287.   # Change this to a null string if obstacks are installed in the
  1288. --- 89,93 ----
  1289.   
  1290.   # Additional system libraries to link with.
  1291. ! CLIB=/lib/libc.a $(libdir)/gcc-gnulib
  1292.   
  1293.   # Change this to a null string if obstacks are installed in the
  1294. ***************
  1295. *** 99,103 ****
  1296.   DIR = ../gcc
  1297.   # this is the GNU CC build directory
  1298. ! TDIR = ../gcc-test
  1299.   
  1300.   # End of variables for you to override.
  1301. --- 98,102 ----
  1302.   DIR = ../gcc
  1303.   # this is the GNU CC build directory
  1304. ! TDIR = ../gcc
  1305.   
  1306.   # End of variables for you to override.
  1307. ***************
  1308. *** 130,134 ****
  1309.   # certain versions of Genix), try getting the files
  1310.   # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
  1311. ! MALLOC = malloc.o
  1312.   
  1313.   # If you are running GCC on an Apollo (SR10.x),
  1314. --- 129,133 ----
  1315.   # certain versions of Genix), try getting the files
  1316.   # malloc.c and getpagesize.h from GNU Emacs and un-comment the following line:
  1317. ! # MALLOC = malloc.o
  1318.   
  1319.   # If you are running GCC on an Apollo (SR10.x),
  1320. ***************
  1321. *** 144,147 ****
  1322. --- 143,147 ----
  1323.   # How to link with both our special library facilities
  1324.   # and the system's installed libraries.
  1325. + # LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(CLIB)
  1326.   LIBS = $(OBSTACK) $(ALLOCA) $(MALLOC) $(CLIB)
  1327.   
  1328. ***************
  1329. *** 205,211 ****
  1330.   # gnulib is not a target because a proper installation of GNU CC
  1331.   # will place it where g++ can find it.  Same with cpp
  1332. ! all: crt1+.o g++ cc1plus ld++ g++filt # collect crt0+.o
  1333.   # On COFF systems, use the target below.
  1334. ! # all: g++ cc1plus collect # crt0+.o crt1+.o
  1335.   
  1336.   doc: $(srcdir)/cpp.info $(srcdir)/g++.info
  1337. --- 205,212 ----
  1338.   # gnulib is not a target because a proper installation of GNU CC
  1339.   # will place it where g++ can find it.  Same with cpp
  1340. ! # all: crt1+.o g++ cc1plus ld++ g++filt # collect crt0+.o
  1341. ! all: crt1+.o g++ cc1plus ld++ g++filt crt0+.o # collect
  1342.   # On COFF systems, use the target below.
  1343. ! # all: g++ cc1plus collect crt0+.o crt1+.o
  1344.   
  1345.   doc: $(srcdir)/cpp.info $(srcdir)/g++.info
  1346. ***************
  1347. *** 263,268 ****
  1348.       elif cmp -s tm.h config/tm-newsgas.h; then \
  1349.           CRT0_OPTIONS='-DCRT0_DUMMIES=bogus_fp, -DDOT_GLOBAL_START'; \
  1350.       elif cmp -s tm.h config/tm-i386gas.h; then \
  1351. !         OPTS='-DUSG -DCOFF_ENCAPSULATE -DNON_NATIVE -DPORTAR'; \
  1352.       else \
  1353.           OPTS='-DTARGET=-1'; \
  1354. --- 264,272 ----
  1355.       elif cmp -s tm.h config/tm-newsgas.h; then \
  1356.           CRT0_OPTIONS='-DCRT0_DUMMIES=bogus_fp, -DDOT_GLOBAL_START'; \
  1357. + ###### elif cmp -s tm.h config/tm-i386gas.h; then
  1358. + ###### OPTS='-DUSG -DCOFF_ENCAPSULATE -DNON_NATIVE -DPORTAR';
  1359.       elif cmp -s tm.h config/tm-i386gas.h; then \
  1360. !         OPTS='-I$(libdir)'; \
  1361. !         DFLTS='"$(libdir)", "/lib", "/usr/lib", "/usr/local/lib"'; \
  1362.       else \
  1363.           OPTS='-DTARGET=-1'; \
  1364. ***************
  1365. *** 281,291 ****
  1366.   
  1367.   collect: collect.c config.h $(LIBDEPS)
  1368. !     COLLECT_LIBS="-lld"; \
  1369.       if cmp -s tm.h config/tm-encore.h; then \
  1370.           COLLECT_OPTIONS='-DUMAX'; \
  1371.       else \
  1372.           COLLECT_OPTIONS=''; \
  1373.       fi; \
  1374. !     $(CC) -o collect $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(INCLUDES) $< -lg -lc $$COLLECT_LIBS
  1375.   
  1376.   collect2: collect2.c config.h
  1377. --- 285,299 ----
  1378.   
  1379.   collect: collect.c config.h $(LIBDEPS)
  1380. !     -set -x; COLLECT_LIBS="-lld -lg"; \
  1381.       if cmp -s tm.h config/tm-encore.h; then \
  1382.           COLLECT_OPTIONS='-DUMAX'; \
  1383. +      elif cmp -s tm.h config/tm-i386gas.h; then \
  1384. +          COLLECT_LIBS=""; COLLECT_OPTIONS=""; \
  1385. +      elif cmp -s tm.h config/tm-decstatn.h; then \
  1386. +          COLLECT_LIBS=""; COLLECT_OPTIONS=""; \
  1387.       else \
  1388.           COLLECT_OPTIONS=''; \
  1389.       fi; \
  1390. !      $(CC) -o collect $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(INCLUDES) collect.c -lc $$COLLECT_LIBS
  1391.   
  1392.   collect2: collect2.c config.h
  1393. ***************
  1394. *** 321,325 ****
  1395.       mv crt0.o crt0+.o
  1396.   
  1397. ! CRT1_COMMAND=$(CC) -Um68k -g -c $(INCLUDES) crt1.c
  1398.   
  1399.   crt1+.o: crt1.c config.h
  1400. --- 329,333 ----
  1401.       mv crt0.o crt0+.o
  1402.   
  1403. ! CRT1_COMMAND=$(CC) -Um68k -c $(INCLUDES) crt1.c
  1404.   
  1405.   crt1+.o: crt1.c config.h
  1406. ***************
  1407. *** 601,605 ****
  1408.       $(INSTALL) g++ $(bindir)
  1409.       -if [ -f ld++ ] ; then $(INSTALL) ld++ $(libdir)/gcc-ld ;fi
  1410. ! #    -if [ -f crt0+.o ] ; then $(INSTALL) crt0+.o $(startdir)/crt0+.o ;fi
  1411.       -if [ -f crt1+.o ] ; then $(INSTALL) crt1+.o $(startdir)/crt1+.o ;fi
  1412.       -mkdir $(libdir)/g++-include
  1413. --- 609,613 ----
  1414.       $(INSTALL) g++ $(bindir)
  1415.       -if [ -f ld++ ] ; then $(INSTALL) ld++ $(libdir)/gcc-ld ;fi
  1416. !     -if [ -f crt0+.o ] ; then $(INSTALL) crt0+.o $(startdir)/crt0+.o ;fi
  1417.       -if [ -f crt1+.o ] ; then $(INSTALL) crt1+.o $(startdir)/crt1+.o ;fi
  1418.       -mkdir $(libdir)/g++-include
  1419. Only in g++: Makefile.bak
  1420. Only in g++: Makefile~
  1421. Only in g++: assert.h
  1422. Only in g++: aux-output.c
  1423. Only in g++: basic-block.h
  1424. Only in g++: bison.simple
  1425. Only in g++: c-tree.h
  1426. Only in g++: caller-save.c
  1427. Only in g++: caller-save.o
  1428. Only in g++: case.o
  1429. Only in g++: cc1plus
  1430. diff -rc2 g++-1.37.1/collect.c g++/collect.c
  1431. *** g++-1.37.1/collect.c    Wed Nov 22 23:29:14 1989
  1432. --- g++/collect.c    Thu Apr 12 15:42:38 1990
  1433. ***************
  1434. *** 69,73 ****
  1435. --- 69,75 ----
  1436.   #ifdef i386
  1437.   #define ASM_INT_OP    ASM_LONG
  1438. + #ifdef NOT_MACH
  1439.   #define NO_UNDERSCORES 1
  1440. + #endif
  1441.   #endif
  1442.   
  1443. Only in g++: collect.c~
  1444. Only in g++: combine.c
  1445. Only in g++: combine.o
  1446. Only in g++: conditions.h
  1447. Only in g++: config
  1448. diff -rc2 g++-1.37.1/config.g++ g++/config.g++
  1449. *** g++-1.37.1/config.g++    Sun Nov  5 00:26:35 1989
  1450. --- g++/config.g++    Thu Apr  5 11:02:12 1990
  1451. ***************
  1452. *** 109,112 ****
  1453. --- 109,119 ----
  1454.           machine_type=i386gas
  1455.           ;;        
  1456. + #ifndef NOT_MACH
  1457. +     i386)
  1458. +         cpu_type=i386
  1459. +         configuration_file=xm-i386.h
  1460. +         target_machine=tm-i386gas.h
  1461. +         ;;
  1462. + #endif NOT_MACH 
  1463.       i860)
  1464.           ;;
  1465. Only in g++: config.g++~
  1466. Only in g++: config.gcc
  1467. Only in g++: config.h
  1468. Only in g++: config.status
  1469. Only in g++: cplus-class.o
  1470. Only in g++: cplus-cvt.o
  1471. Only in g++: cplus-decl.o
  1472. Only in g++: cplus-decl2.o
  1473. Only in g++: cplus-dem.o
  1474. Only in g++: cplus-except.o
  1475. Only in g++: cplus-expr.o
  1476. Only in g++: cplus-init.o
  1477. diff -rc2 g++-1.37.1/cplus-lex.c g++/cplus-lex.c
  1478. *** g++-1.37.1/cplus-lex.c    Thu Feb 22 08:51:38 1990
  1479. --- g++/cplus-lex.c    Thu Apr 19 10:26:15 1990
  1480. ***************
  1481. *** 32,35 ****
  1482. --- 32,38 ----
  1483.   #define _IOFBF 2        /* Missing from GNU's stdio.h */
  1484.   #endif
  1485. + #if defined(i386) && !defined(NOT_MACH)
  1486. + #define _IOFBF 0
  1487. + #endif
  1488.   #include "cplus-tab.h"
  1489.   #include "cplus-parse.h"
  1490. ***************
  1491. *** 1126,1130 ****
  1492.         pending_inlines = pending_inlines->next;
  1493.         finput = finput2;
  1494. ! #if defined(i386) && !defined(sequent) && !defined(sun386)
  1495.         finput2->_ptr = finput2->_base = t->buf;
  1496.         _bufend(finput2) = t->buf + t->len;
  1497. --- 1129,1133 ----
  1498.         pending_inlines = pending_inlines->next;
  1499.         finput = finput2;
  1500. ! #if defined(i386) && defined(NOT_MACH) && !defined(sequent) && !defined(sun386)
  1501.         finput2->_ptr = finput2->_base = t->buf;
  1502.         _bufend(finput2) = t->buf + t->len;
  1503. ***************
  1504. *** 2284,2288 ****
  1505.            end of this function.  */
  1506.             pending_inlines = pending_inlines->next;
  1507. ! #if defined(i386) && !defined(sequent) && !defined(sun386)
  1508.             finput2->_ptr = finput2->_base = t->buf;
  1509.             _bufend(finput2) = t->buf + t->len;
  1510. --- 2287,2291 ----
  1511.            end of this function.  */
  1512.             pending_inlines = pending_inlines->next;
  1513. ! #if defined(i386) && defined(NOT_MACH) && !defined(sequent) && !defined(sun386)
  1514.             finput2->_ptr = finput2->_base = t->buf;
  1515.             _bufend(finput2) = t->buf + t->len;
  1516. Only in g++: cplus-lex.c.orig
  1517. Only in g++: cplus-lex.c~
  1518. Only in g++: cplus-lex.o
  1519. Only in g++: cplus-method.o
  1520. Only in g++: cplus-ptree.o
  1521. Only in g++: cplus-search.o
  1522. Only in g++: cplus-tab.c
  1523. Only in g++: cplus-tab.h
  1524. Only in g++: cplus-tab.o
  1525. Only in g++: cplus-tab.output
  1526. Only in g++: cplus-tree.o
  1527. Only in g++: cplus-type2.o
  1528. Only in g++: cplus-typeck.o
  1529. Only in g++: crt0+.o
  1530. Only in g++: crt1+.o
  1531. Only in g++: cse.c
  1532. Only in g++: cse.o
  1533. Only in g++: dbxout.o
  1534. Only in g++: emit-rtl.c
  1535. Only in g++: emit-rtl.o
  1536. Only in g++: explow.c
  1537. Only in g++: explow.o
  1538. Only in g++: expmed.c
  1539. Only in g++: expmed.o
  1540. Only in g++: expr.o
  1541. Only in g++: final.c
  1542. Only in g++: final.o
  1543. Only in g++: flow.c
  1544. Only in g++: flow.o
  1545. Only in g++: fold-const.c
  1546. Only in g++: fold-const.o
  1547. Only in g++: g++
  1548. Only in g++-1.37.1: g++.diff-1.37.0-1.37.1
  1549. Only in g++: g++filt
  1550. Only in g++: g++filt.o
  1551. diff -rc2 g++-1.37.1/gcc.c g++/gcc.c
  1552. *** g++-1.37.1/gcc.c    Sat Jan 20 07:21:10 1990
  1553. --- g++/gcc.c    Thu Apr 19 12:24:20 1990
  1554. ***************
  1555. *** 312,317 ****
  1556.    %{y*} %{!nostdlib:%S} \
  1557.    %{L*} %o %{!nostdlib:-lg++ gnulib%s %{g:-lg} %L}\n }}}}";
  1558. ! #else
  1559.   /* Here is the spec for running the linker, after compiling all files.  */
  1560.   char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld %{o*} %l\
  1561.    %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
  1562. --- 312,318 ----
  1563.    %{y*} %{!nostdlib:%S} \
  1564.    %{L*} %o %{!nostdlib:-lg++ gnulib%s %{g:-lg} %L}\n }}}}";
  1565. ! #else USE_COLLECT
  1566.   /* Here is the spec for running the linker, after compiling all files.  */
  1567. + #ifdef NOT_MACH
  1568.   char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld %{o*} %l\
  1569.    %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
  1570. ***************
  1571. *** 318,322 ****
  1572.    %{y*} %{!nostdlib:%S} \
  1573.    %{L*} %o %{!nostdlib:-lg++ gnulib%s %{g:-lg} %L}\n }}}}";
  1574. ! #endif
  1575.   
  1576.   /* Accumulate a command (program name and args), and run it.  */
  1577. --- 319,329 ----
  1578.    %{y*} %{!nostdlib:%S} \
  1579.    %{L*} %o %{!nostdlib:-lg++ gnulib%s %{g:-lg} %L}\n }}}}";
  1580. ! #else NOT_MACH
  1581. ! char *link_spec = "%{!c:%{!M*:%{!E:%{!S:ld %{o*} %l\
  1582. !  %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{S} %{T*} %{t} %{u*} %{X} %{x} %{z}\
  1583. !  %{y*} %{!nostdlib:%S} \
  1584. !  %{L*} %o %{!nostdlib:-lg++ %{g:-lg} %L gnulib%s -lc}\n }}}}";
  1585. ! #endif NOT_MACH
  1586. ! #endif USE_COLLECT
  1587.   
  1588.   /* Accumulate a command (program name and args), and run it.  */
  1589. Only in g++: gcc.c.bak
  1590. Only in g++: gcc.c.orig
  1591. Only in g++: gcc.c~
  1592. Only in g++: gcc.o
  1593. Only in g++: gdbfiles.h
  1594. Only in g++: gencodes
  1595. Only in g++: gencodes.c
  1596. Only in g++: gencodes.o
  1597. Only in g++: genconfig
  1598. Only in g++: genconfig.c
  1599. Only in g++: genconfig.o
  1600. Only in g++: genemit
  1601. Only in g++: genemit.c
  1602. Only in g++: genemit.o
  1603. Only in g++: genextract
  1604. Only in g++: genextract.c
  1605. Only in g++: genextract.o
  1606. Only in g++: genflags
  1607. Only in g++: genflags.c
  1608. Only in g++: genflags.o
  1609. Only in g++: genoutput
  1610. Only in g++: genoutput.c
  1611. Only in g++: genoutput.o
  1612. Only in g++: genpeep
  1613. Only in g++: genpeep.c
  1614. Only in g++: genpeep.o
  1615. Only in g++: genrecog
  1616. Only in g++: genrecog.c
  1617. Only in g++: genrecog.o
  1618. Only in g++: global-alloc.c
  1619. Only in g++: global-alloc.o
  1620. Only in g++: gvarargs.h
  1621. Only in g++: hard-reg-set.h
  1622. Only in g++: insn-codes.h
  1623. Only in g++: insn-config.h
  1624. Only in g++: insn-emit.c
  1625. Only in g++: insn-emit.o
  1626. Only in g++: insn-extract.c
  1627. Only in g++: insn-extract.o
  1628. Only in g++: insn-flags.h
  1629. Only in g++: insn-output.c
  1630. Only in g++: insn-output.o
  1631. Only in g++: insn-peep.c
  1632. Only in g++: insn-peep.o
  1633. Only in g++: insn-recog.c
  1634. Only in g++: insn-recog.o
  1635. Only in g++: integrate.o
  1636. Only in g++: jump.c
  1637. Only in g++: jump.o
  1638. Only in g++: lastfile.o
  1639. Only in g++: ld++
  1640. diff -rc2 g++-1.37.1/ld.c g++/ld.c
  1641. *** g++-1.37.1/ld.c    Fri Apr 13 15:34:25 1990
  1642. --- g++/ld.c    Fri Apr  6 16:22:49 1990
  1643. ***************
  1644. *** 1,2 ****
  1645. --- 1,36 ----
  1646. + /* 
  1647. +  * Mach Operating System
  1648. +  * Copyright (c) 1990 Carnegie-Mellon University
  1649. +  * Copyright (c) 1989 Carnegie-Mellon University
  1650. +  * All rights reserved.  The CMU software License Agreement specifies
  1651. +  * the terms and conditions for use and redistribution.
  1652. +  */
  1653. + /*
  1654. +  * HISTORY
  1655. +  * $Log: HINTS,v $
  1656. # Revision 1.2  1991/07/30  04:48:16  hgs
  1657. # *** empty log message ***
  1658. #
  1659. +  */
  1660. + /*
  1661. +  *  Note: the copyright above only applies to the MACH changes in the file.
  1662. +  *
  1663. +  *    The files below were changed from the orginals provided in binutils.
  1664. +  *  All changes are in #ifdef NOT_MACH ... #else ... #endif conditionals.
  1665. +  *  The changes are intended for use with the i386 MACH 2.5 operating 
  1666. +  *  environment.
  1667. +  *
  1668. +  *    NOTE:  MACH ld has a few major changes from the base ld:
  1669. +  *         The struct exec is part of the file.  It is loaded
  1670. +  *        with the text.
  1671. +  *         The text start address is 0x10000.  The low 64k is
  1672. +  *        never mapped.  The pagesize is always 4k.
  1673. +  */
  1674. + /*
  1675. +     Makefile
  1676. +     ar.c
  1677. +     a.out.h
  1678. +     ld.c
  1679. +     nm.c
  1680. + */
  1681.   /* Linker `ld' for GNU
  1682.      Copyright (C) 1988 Free Software Foundation, Inc.
  1683. ***************
  1684. *** 177,181 ****
  1685.   #endif
  1686.   #if defined(i386) && !defined(sequent)
  1687. !   #define INITIALIZE_HEADER N_SET_MACHTYPE (outheader, M_386)
  1688.   #endif
  1689.   
  1690. --- 211,219 ----
  1691.   #endif
  1692.   #if defined(i386) && !defined(sequent)
  1693. !   #ifdef    NOT_MACH
  1694. !     #define INITIALIZE_HEADER N_SET_MACHTYPE (outheader, M_386)
  1695. !   #else    NOT_MACH
  1696. !     #define INITIALIZE_HEADER
  1697. !   #endif    NOT_MACH
  1698.   #endif
  1699.   
  1700. ***************
  1701. *** 1024,1027 ****
  1702. --- 1062,1070 ----
  1703.     if (!T_flag_specified && !relocatable_output)
  1704.       text_start = N_TXTADDR (outheader);
  1705. + #ifdef    NOT_MACH
  1706. + #else    NOT_MACH
  1707. +   else if (T_flag_specified == 1 && magic == OMAGIC)
  1708. +     text_start -= N_TXTOFF (outheader);    /* cancel previous "error" */
  1709. + #endif    NOT_MACH
  1710.   
  1711.     /* The text-start address is normally this far past a page boundary.  */
  1712. ***************
  1713. *** 1191,1205 ****
  1714.   
  1715.     /* Now check some option settings for consistency.  */
  1716. ! #ifdef NMAGIC
  1717.     if ((magic == ZMAGIC || magic == NMAGIC)
  1718. - #else
  1719. -   if ((magic == ZMAGIC)
  1720. - #endif
  1721.         && (text_start - text_start_alignment) & (page_size - 1))
  1722.       fatal ("-T argument not multiple of page size, with sharable output", 0);
  1723.   
  1724.     /* Append the standard search directories to the user-specified ones.  */
  1725.     {
  1726.       int n = sizeof standard_search_dirs / sizeof standard_search_dirs[0];
  1727.       n_search_dirs += n;
  1728. --- 1234,1278 ----
  1729.   
  1730.     /* Now check some option settings for consistency.  */
  1731. ! #ifdef    NOT_MACH
  1732.     if ((magic == ZMAGIC || magic == NMAGIC)
  1733.         && (text_start - text_start_alignment) & (page_size - 1))
  1734.       fatal ("-T argument not multiple of page size, with sharable output", 0);
  1735. + #else    NOT_MACH
  1736. +   /*
  1737. +    * The check above is stupid, since text_start_alignment is not computed
  1738. +    * until after we are return.  So it's zero.
  1739. +    */
  1740. + #endif    NOT_MACH
  1741.   
  1742.     /* Append the standard search directories to the user-specified ones.  */
  1743. + #ifndef    NOT_MACH
  1744. +   if ((int) getenv("LPATH"))
  1745.     {
  1746. +     char *lpath = (char *)getenv("LPATH");
  1747. +     char *bp = lpath;
  1748. +     char *cp = lpath;
  1749. +     char *sp = (char *) 0;
  1750. +     int  len;
  1751. +     int  c = 1;
  1752. +     for(; c; bp = ++cp) {
  1753. +     while ((c = *cp) && c != ':') cp++;
  1754. +     if (len = (cp - bp)) {
  1755. +         sp = (char *) xmalloc(len+1);
  1756. +         bcopy(bp, sp, len);
  1757. +         sp[len] = 0;
  1758. +     } else {
  1759. +         sp = (char *) xmalloc(1+1);
  1760. +         bcopy(".", sp, 1+1);
  1761. +     }
  1762. +     n_search_dirs++;
  1763. +     search_dirs
  1764. +       = (char **) xrealloc (search_dirs, n_search_dirs * sizeof (char *));
  1765. +     search_dirs[n_search_dirs - 1] = sp;
  1766. +     }
  1767. +   }
  1768. +   else 
  1769. + #endif    NOT_MACH
  1770. +   {
  1771.       int n = sizeof standard_search_dirs / sizeof standard_search_dirs[0];
  1772.       n_search_dirs += n;
  1773. ***************
  1774. *** 1275,1278 ****
  1775. --- 1348,1355 ----
  1776.       {
  1777.         text_start = parse (arg, "%x", "invalid argument to -Ttext");
  1778. + #ifdef    NOT_MACH
  1779. + #else    NOT_MACH
  1780. +       text_start += N_TXTOFF (outheader);
  1781. + #endif    NOT_MACH
  1782.         T_flag_specified = 1;
  1783.         return;
  1784. ***************
  1785. *** 1361,1364 ****
  1786. --- 1438,1445 ----
  1787.       case 'T':
  1788.         text_start = parse (arg, "%x", "invalid argument to -T");
  1789. + #ifdef    NOT_MACH
  1790. + #else    NOT_MACH
  1791. +       text_start += N_TXTOFF (outheader);
  1792. + #endif    NOT_MACH
  1793.         T_flag_specified = 1;
  1794.         return;
  1795. ***************
  1796. *** 2471,2475 ****
  1797. --- 2552,2560 ----
  1798.       {
  1799.         int text_end = text_size + N_TXTOFF (outheader);
  1800. + #ifdef    NOT_MACH
  1801.         text_pad = ((text_end + page_size - 1) & (- page_size)) - text_end;
  1802. + #else    NOT_MACH
  1803. +       text_pad = ((text_end + SEGMENT_SIZE - 1) & (- SEGMENT_SIZE)) - text_end;
  1804. + #endif    NOT_MACH
  1805.         text_size += text_pad;
  1806.       }
  1807. ***************
  1808. *** 2483,2487 ****
  1809. --- 2568,2576 ----
  1810.   
  1811.     if (! Tdata_flag_specified)
  1812. + #ifdef    NOT_MACH
  1813.       data_start = N_DATADDR (outheader) + text_start - N_TXTADDR (outheader);
  1814. + #else    NOT_MACH
  1815. +     data_start = text_start + text_size;
  1816. + #endif    NOT_MACH
  1817.   
  1818.     /* Set up the set element vector */
  1819. ***************
  1820. *** 2642,2648 ****
  1821. --- 2731,2745 ----
  1822.       data_pad = specified_data_size - data_size;
  1823.   
  1824. + #ifdef    NOT_MACH
  1825.     if (magic == ZMAGIC)
  1826.       data_pad = ((data_pad + data_size + page_size - 1) & (- page_size))
  1827.                  - data_size;
  1828. + #else    NOT_MACH
  1829. + #if    0
  1830. +   if (magic == ZMAGIC)
  1831. +     data_pad = ((data_pad + data_size + SEGMENT_SIZE - 1) & (- SEGMENT_SIZE))
  1832. +                - data_size;
  1833. + #endif    0
  1834. + #endif    NOT_MACH
  1835.   
  1836.     bss_size -= data_pad;
  1837. ***************
  1838. *** 3351,3354 ****
  1839. --- 3448,3458 ----
  1840.   {
  1841.     N_SET_MAGIC (outheader, magic);
  1842. + #ifdef    NOT_MACH
  1843. + #else    NOT_MACH
  1844. +   if ((T_flag_specified || Tdata_flag_specified) && ((text_start&0xf0000000) != 0xc0000000)) /* this last conjunct is a tmp hack */
  1845. +     {
  1846. +     N_SET_FLAGS(outheader, 0x01);
  1847. +     }
  1848. + #endif    NOT_MACH
  1849.     outheader.a_text = text_size;
  1850.   #ifdef sequent
  1851. ***************
  1852. *** 3448,3451 ****
  1853. --- 3552,3566 ----
  1854.     outheader.a_syms = nsyms * sizeof (struct nlist);
  1855.   
  1856. + #ifdef    NOT_MACH
  1857. + #else    NOT_MACH
  1858. +   if ((T_flag_specified || Tdata_flag_specified) && ((text_start&0xf0000000) != 0xc0000000)) /* this last conjunct is a tmp hack */
  1859. +     {
  1860. +      if (T_flag_specified)
  1861. +     outheader.a_trsize = text_start - ((magic == OMAGIC) ? 0 :
  1862. +                               N_TXTOFF(outheader));
  1863. +      if (Tdata_flag_specified)
  1864. +     outheader.a_drsize = data_start;
  1865. +     } else
  1866. + #endif    NOT_MACH
  1867.     if (relocatable_output)
  1868.       {
  1869. Only in g++: ld.c.bak
  1870. Only in g++: ld.c.new
  1871. Only in g++: ld.c~
  1872. Only in g++: ld.o
  1873. Only in g++: limits.h
  1874. Only in g++: local-alloc.c
  1875. Only in g++: local-alloc.o
  1876. Only in g++: loop.c
  1877. Only in g++: loop.o
  1878. Only in g++: machmode.def
  1879. Only in g++: md
  1880. Only in g++: move-if-change
  1881. Only in g++: obstack.c
  1882. Only in g++: obstack.h
  1883. Only in g++: obstack.o
  1884. Only in g++: optabs.c
  1885. Only in g++: optabs.o
  1886. Only in g++: output.h
  1887. Only in g++: print-tree.o
  1888. Only in g++: real.h
  1889. Only in g++: recog.c
  1890. Only in g++: recog.h
  1891. Only in g++: recog.o
  1892. Only in g++: regclass.c
  1893. Only in g++: regclass.o
  1894. Only in g++: regs.h
  1895. Only in g++: reload.c
  1896. Only in g++: reload.h
  1897. Only in g++: reload.o
  1898. Only in g++: reload1.c
  1899. Only in g++: reload1.o
  1900. Only in g++: rtl.c
  1901. Only in g++: rtl.def
  1902. Only in g++: rtl.h
  1903. Only in g++: rtl.o
  1904. Only in g++: rtlanal.c
  1905. Only in g++: rtlanal.o
  1906. Only in g++: sdbout.c
  1907. Only in g++: sdbout.o
  1908. Only in g++: stab.def
  1909. Only in g++: stamp-codes.h
  1910. Only in g++: stamp-config.h
  1911. Only in g++: stamp-emit.c
  1912. Only in g++: stamp-extract.c
  1913. Only in g++: stamp-flags.h
  1914. Only in g++: stamp-output.c
  1915. Only in g++: stamp-peep.c
  1916. Only in g++: stamp-recog.c
  1917. Only in g++: stdarg.h
  1918. Only in g++: stddef.h
  1919. Only in g++: stmt.o
  1920. Only in g++: stor-layout.o
  1921. Only in g++: stupid.c
  1922. Only in g++: stupid.o
  1923. Only in g++: symout.o
  1924. Only in g++: symseg.h
  1925. Only in g++: tm.h
  1926. Only in g++: toplev.o
  1927. Only in g++: tree.o
  1928. Only in g++: typeclass.h
  1929. Only in g++: varasm.o
  1930. Only in g++: version.o
  1931.  
  1932. Diff file for libg++-1.37.0
  1933. --------------------------------------------------------------------
  1934. *** g++-include/sys/stat.h~    Tue Nov 28 07:11:50 1989
  1935. --- g++-include/sys/stat.h    Fri Apr 13 12:12:15 1990
  1936. ***************
  1937. *** 9,16 ****
  1938.   #ifndef stat_h
  1939.   #define stat_h 1
  1940.   int stat (char *path, struct stat *buf);
  1941.   int lstat (char *path, struct stat *buf);
  1942.   int fstat (int fd, struct stat *buf);
  1943.   #endif
  1944.   
  1945. --- 9,17 ----
  1946.   #ifndef stat_h
  1947.   #define stat_h 1
  1948. + #ifdef NOT_MACH
  1949.   int stat (char *path, struct stat *buf);
  1950.   int lstat (char *path, struct stat *buf);
  1951.   int fstat (int fd, struct stat *buf);
  1952. ! #endif
  1953.   #endif
  1954.   
  1955. *** g++-include/math.h~    Thu Apr 19 10:50:06 1990
  1956. --- g++-include/math.h    Thu Apr 19 10:50:30 1990
  1957. ***************
  1958. *** 151,155 ****
  1959. --- 151,159 ----
  1960.   
  1961.   #ifndef HUGE
  1962. + #ifdef i386
  1963. + #define HUGE    MAXFLOAT
  1964. + #else
  1965.   #define HUGE    MAXDOUBLE
  1966. + #endif
  1967.   #endif
  1968.   
  1969.  
  1970. ---
  1971. Paulo Guedes     Open Software Foundation   11 Cambridge Center, Cambridge, MA
  1972. Email: pjg@osf.osf.org    Phone: (617) 621-8878
  1973.  
  1974. 
  1975. 1,,
  1976. Return-Path: <jim@kaos.Stanford.EDU>
  1977. Received: from Sun.COM (sun-barr) by teacake.sun.com (4.1/SMI-4.1)
  1978.     id AA00350; Thu, 12 Apr 90 12:29:07 PDT
  1979. Received: from kaos.Stanford.EDU by Sun.COM (4.1/SMI-4.1)
  1980.     id AA03158; Thu, 12 Apr 90 12:26:21 PDT
  1981. Received: by kaos.Stanford.EDU (4.1/inc-1.0)
  1982.     id AA22821; Thu, 12 Apr 90 12:24:10 PDT
  1983. Message-Id: <9004121924.AA22821@kaos.Stanford.EDU>
  1984. To: tiemann@sun.com
  1985. Cc: jim@kaos.Stanford.EDU
  1986. Subject: g++ 1.37.2x  on SGI boxes
  1987. Date: Thu, 12 Apr 90 12:24:09 PDT
  1988. From: Jim Helman <jim@kaos.Stanford.EDU>
  1989. Status: R
  1990.  
  1991. *** EOOH ***
  1992. Return-Path: <jim@kaos.Stanford.EDU>
  1993. To: tiemann@sun.com
  1994. Cc: jim@kaos.Stanford.EDU
  1995. Subject: g++ 1.37.2x  on SGI boxes
  1996. Date: Thu, 12 Apr 90 12:24:09 PDT
  1997. From: Jim Helman <jim@kaos.Stanford.EDU>
  1998.  
  1999. I ran into a few problems getting g++ + libg++ up on our machines.  A
  2000. few changes needed to be made in addition to the COFF/SYSV changes
  2001. listed in HINTS & README.  They're mostly trivial, but the
  2002. NO_UNDERSCORES one had me stumped for a while.
  2003.  
  2004.     COLLECT_LIBS='-lmld'
  2005.  
  2006. rather than 
  2007.  
  2008.     COLLECT_LIBS='-lld'
  2009.  
  2010. IRIX's make only defines $< for inference rules, so:
  2011.  
  2012.     $(CC) -o collect $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(INCLUDES)
  2013.      collect.o -lc $$COLLECT_LIBS
  2014.  
  2015. rather than
  2016.  
  2017.     $(CC) -o collect $(PROFILE) $$COLLECT_OPTIONS $(CFLAGS) $(INCLUDES)
  2018.     $< -lg -lc $$COLLECT_LIBS
  2019.  
  2020. >From: chin@operations.dccs.upenn.edu (Chin Wu), for collect add to
  2021. xm-iris.h:
  2022.  
  2023.     #define NO_UNDERSCORES 
  2024.  
  2025. And one question.  When "-lm" is specified on the command line, why
  2026. does g++ insert it before -lg++ rather than after?  This happens to me
  2027. with both the Sun3/OS4 and Iris versions.  I just added a "-lm" to the
  2028. LIB_SPEC.  What's the correct way to fix this?
  2029.  
  2030. Is there any debugger support (either dbx or gdb) in the works for
  2031. the MIPS and Iris machines?
  2032.  
  2033. -jim
  2034.  
  2035.  
  2036. 
  2037. 1,,
  2038. Return-Path: <info-g++-request@prep.ai.mit.edu>
  2039. Received: from Sun.COM (sun-barr.EBay.Sun.COM) by teacake.Eng.Sun.COM (4.1/SMI-4.1)
  2040.     id AA09983; Thu, 26 Apr 90 17:32:52 PDT
  2041. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  2042.     id AA00698; Thu, 26 Apr 90 17:29:29 PDT
  2043. Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.1/AI-4.10) id AA08561; Thu, 26 Apr 90 20:26:56 EDT
  2044. Received: by tut.cis.ohio-state.edu (5.61-kk/5.900417)
  2045.     id AA14126; Thu, 26 Apr 90 20:18:19 -0400
  2046. Received: from USENET by tut.cis.ohio-state.edu with netnews
  2047.     for info-g++@prep.ai.mit.edu (info-g++@prep.ai.mit.edu)
  2048.     (contact usenet@tut.cis.ohio-state.edu if you have questions)
  2049. Date: 25 Apr 90 17:12:34 GMT
  2050. From: pacbell!osc!rp@lll-winken.llnl.gov  (Rich Patterson)
  2051. Organization: Object Sciences Corp., Menlo Park, CA
  2052. Subject: Re: Help -- Installing g++ 1.37 on Sun386i
  2053. Message-Id: <2756@osc.COM>
  2054. References: <5309@maslow.ptolemy.arc.nasa.gov>
  2055. Sender: info-g++-request@prep.ai.mit.edu
  2056. To: info-g++@prep.ai.mit.edu
  2057. Status: RO
  2058.  
  2059. *** EOOH ***
  2060. Return-Path: <info-g++-request@prep.ai.mit.edu>
  2061. Date: 25 Apr 90 17:12:34 GMT
  2062. From: pacbell!osc!rp@lll-winken.llnl.gov  (Rich Patterson)
  2063. Organization: Object Sciences Corp., Menlo Park, CA
  2064. Subject: Re: Help -- Installing g++ 1.37 on Sun386i
  2065. References: <5309@maslow.ptolemy.arc.nasa.gov>
  2066. Sender: info-g++-request@prep.ai.mit.edu
  2067. To: info-g++@prep.ai.mit.edu
  2068.  
  2069. Hi,`
  2070.     Here is a copy of a previous article I sent awhile ago when I installed
  2071. gcc/g++/libg++ on my 386 Unix Box.  I have Unix System V release 3.0, not
  2072. 3.2.  I can't remember, which utility had different makes for 386 and 386 3.2
  2073. (it might have been gdb).  Well anyways here is a copy of those notes:
  2074.  
  2075. ---- previous article follows ----
  2076. [My purpose for this article is that others will validate these issues also
  2077.  and the updates will be rolled into the next release]
  2078.  
  2079. Hi,
  2080.         Here are some installation problems that I had with g++ and libg++.
  2081. After making the following changes, I was able to  successfully install and
  2082. run g++ 1.36.4 and libg++ 1.36.3 under 386 Unix System V release 3.0.
  2083.         I was able to build all of libg++.  The only tests that I was unable to
  2084. run successfully were test0 (incremental loading) and the Fix48() portion of
  2085. tFix24 (got a floating point exception - could be a bug on my 386).  The rest
  2086. of the tests ran successfully and checktests showed only a few differences
  2087. (such as the statistics on tRandom).  Here are the things I found that
  2088. needed to be changed:
  2089.  
  2090. G++:
  2091.         1. When running maketests, the link for the "config"
  2092.            directory will fail.  System V will not allow you to link
  2093.            the directory.  In order to get the config directory you
  2094.            need to do a mkdir and then copy the config files from your
  2095.            gcc/config directory.
  2096.  
  2097.         2. malloc.c requires the definition of bcopy.
  2098.            If you end up using malloc.c that is with g++
  2099.            then you will need to define bcopy inside malloc.c.
  2100.            When malloc.c is compiled it doesn't read the config.h
  2101.            file that has all those nice definitions.
  2102.  
  2103.         3. insn-codes.h is needed by expr.c.  The makefile will
  2104.            stop at this point because insn-codes.h hasn't been
  2105.            created by 'gencodes' yet.  What I did was copy it
  2106.            from my gcc directory. Later it gets recreated, but
  2107.            no harm is done.  I assume if you added the dependency
  2108.            of insn-codes.h to expr.c, the header file would be created
  2109.            automatically.
  2110.  
  2111.         4. cplus-dem.c needed a change for the include of memory.h or
  2112.            the defines of strchr, etc.  What happened is that when built,
  2113.            the define USG is not defined in the makefile so it trys to get
  2114.            index. For System that was a problem, and ld++ dumped core
  2115.            nicely.  Make sure you define USG, or better yet, since SYSV is
  2116.            defined for g++, cplus-dem.c should be changed.
  2117.  
  2118. LIBG++:
  2119.         1. gnulib3.c - Make sure COFF_ENCAPSULATE is defined.  If not
  2120.            gnulib checks for i386 and defines COFF which doesn't define
  2121.            the magic __do_global_init (&__1xyzzy__).  [Yes, xyzzy is
  2122.            magic not only in adventure but in libg++ as well!]
  2123.  
  2124.         2. stdio.h - For System V release 3.0, _flag is a char.
  2125.            I made that change. (I didn't change the other fields from
  2126.            char to unsigned char, currently I haven't had a problem)
  2127.  
  2128.         3. malloc.c - Yes malloc.c seems to crop up a lot!  In this one
  2129.            fprintf is defined inside of malloc.c along with stdio.h.  I
  2130.            ended up putting #ifdefs around it.
  2131.  
  2132.         4. g++-include/time.h - For System V, at least the version I have
  2133.            time.h lives only in /usr/include, not in /usr/include/sys. So
  2134.            I made the following mod:
  2135.  
  2136.           + #ifndef     USG
  2137.             #include "//usr/include/sys/time.h"
  2138.           + #endif
  2139.             #include "//usr/include/sys/times.h"
  2140.             #include "//usr/include/time.h"
  2141.  
  2142.         5. math.h - For the 386, HUGE is defined at MAXFLOAT.
  2143.  
  2144.         6. values.h - I didn't have time to examine this file yet.
  2145.  
  2146. Commentary:
  2147.         One thing that is very important to do is USE THE COFF ENCAPSULATION
  2148. FEATURE!! I tried for 2 weeks, first with version 1.35.x and then another week
  2149. with version 1.36.x to do it without COFF encapsulation.  It didn't work !!!
  2150. The assembler output (even with FACIST_ASSEMBLER) was invalid for the AT&T
  2151. assembler.  Use COFF encapsulation!!  Obtain the binutils, GAS and go for it!
  2152.  
  2153.         If anyone has questions or comments feel free to contact me.  I'm
  2154. posting from my home machine now, so please respond to the following signature.
  2155. I hope we can continue to increase the stability and usability of the GNU
  2156. software. Thanks FSF.
  2157.  
  2158. Rich Patterson
  2159. rp@rpx
  2160. {pyramid,zycad}!rpx!rp
  2161.  
  2162. 
  2163. 1,,
  2164. Return-Path: <info-gcc-request@prep.ai.mit.edu>
  2165. Received: from Sun.COM (sun-barr.EBay.Sun.COM) by teacake.Eng.Sun.COM (4.1/SMI-4.1)
  2166.     id AA23868; Thu, 10 May 90 00:53:00 PDT
  2167. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  2168.     id AA07774; Thu, 10 May 90 00:49:35 PDT
  2169. Received: from tut.cis.ohio-state.edu by life.ai.mit.edu (4.1/AI-4.10) id AA26476; Thu, 10 May 90 03:47:55 EDT
  2170. Received: by tut.cis.ohio-state.edu (5.61-kk/5.900430)
  2171.     id AA19116; Thu, 10 May 90 03:40:06 -0400
  2172. Received: from USENET by tut.cis.ohio-state.edu with netnews
  2173.     for info-gcc@prep.ai.mit.edu (info-gcc@prep.ai.mit.edu)
  2174.     (contact usenet@tut.cis.ohio-state.edu if you have questions)
  2175. Date: 10 May 90 06:56:33 GMT
  2176. From: akk@tut.fi  (Kautonen Ari)
  2177. Organization: Tampere University of Technology, Finland
  2178. Subject: Re: GCC Compilation Errors under SCO Unix
  2179. Message-Id: <13003@etana.tut.fi>
  2180. Sender: info-gcc-request@prep.ai.mit.edu
  2181. To: info-gcc@prep.ai.mit.edu
  2182.  
  2183. *** EOOH ***
  2184. Return-Path: <info-gcc-request@prep.ai.mit.edu>
  2185. Date: 10 May 90 06:56:33 GMT
  2186. From: akk@tut.fi  (Kautonen Ari)
  2187. Organization: Tampere University of Technology, Finland
  2188. Subject: Re: GCC Compilation Errors under SCO Unix
  2189. Sender: info-gcc-request@prep.ai.mit.edu
  2190. To: info-gcc@prep.ai.mit.edu
  2191.  
  2192. This is how I solved that same problem:
  2193.  
  2194. 1. ranlib - substitute 'ranlib' with 'ar -st' in Makefile.
  2195. 2. cvtomf - remove the debugging flag (-g) from the Makefile.
  2196.  
  2197. You should also make the 'cpp' before the actual 'gcc', because it
  2198. is needed for preprosessing the files explow.c, recog.c and reload.c.
  2199. The default C-compiler runs out of macro space for those files.
  2200. There might be some other things to do, but I can't just now remember
  2201. what they were. Contact me, if there is something strange in making
  2202. the gcc, I think I can find out the answers to the questions.
  2203.  
  2204. Ari Kautonen  (akk@korppi.tut.fi)
  2205. Ari Kautonen  (akk@tut.fi)
  2206.  
  2207. 
  2208. 1,,
  2209. Return-Path: <@mitvma.mit.edu:I1100905@DBSTU1.BITNET>
  2210. Received: from Sun.COM (sun-barr.EBay.Sun.COM) by teacake.Eng.Sun.COM (4.1/SMI-4.1)
  2211.     id AA06426; Mon, 4 Jun 90 12:14:18 PDT
  2212. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  2213.     id AA28892; Mon, 4 Jun 90 12:11:16 PDT
  2214. Received: from mitvma.mit.edu by life.ai.mit.edu (4.1/AI-4.10) id AA26702; Mon, 4 Jun 90 15:10:16 EDT
  2215. Message-Id: <9006041910.AA26702@life.ai.mit.edu>
  2216. Received: from MITVMA.MIT.EDU by mitvma.mit.edu (IBM VM SMTP R1.2.1MX) with BSMTP id 1291; Mon, 04 Jun 90 15:09:22 EDT
  2217. Received: from DEARN by MITVMA.MIT.EDU (Mailer R2.05) with BSMTP id 1102; Mon,
  2218.  04 Jun 90 15:09:21 EDT
  2219. Received: from DBSTU1 (I1100905) by DEARN (Mailer R2.03B) with BSMTP id 6484;
  2220.  Mon, 04 Jun 90 21:08:32 CET
  2221. Date:         Mon, 04 Jun 90 21:06:05 MEZ
  2222. From: Stefan Petri <I1100905%DBSTU1.BITNET@mitvma.mit.edu>
  2223. Subject:      g++ on pyramid (?)
  2224. To: bug-g++@prep.ai.mit.edu
  2225. Status: O
  2226.  
  2227. *** EOOH ***
  2228. Return-Path: <@mitvma.mit.edu:I1100905@DBSTU1.BITNET>
  2229. Date:         Mon, 04 Jun 90 21:06:05 MEZ
  2230. From: Stefan Petri <I1100905%DBSTU1.BITNET@mitvma.mit.edu>
  2231. Subject:      g++ on pyramid (?)
  2232. To: bug-g++@prep.ai.mit.edu
  2233.  
  2234.  
  2235. Has anyone successfully built g++ on a pyramid (Targon/35) ?
  2236. I got everything to compile, and the resulting binaries seem to run fine,
  2237. but all the test - programs dumped core.
  2238. The problem seems to be in the GNU-Linker: very small gcc-compiled
  2239. programs run fine, but bigger ones don't, when linked by GNU-ld.
  2240. I also tried collect2 without success.
  2241. I guess I did not fully understand the instructions on what combination
  2242. of crt*.o vs Linker to use for what type of system. (?)
  2243.  
  2244. Here are some things I came across when trying to install g++1.37.
  2245. (I did it in the ucb-universe (of course :-; )
  2246. After installing gcc-1.37 I had to run fixincludes (never did it before)
  2247. because gcc -traditional didnt grok
  2248. > #ifdef __GNU__
  2249. > __inline
  2250. > #endif
  2251. in cplus-tab.c
  2252.  
  2253. The if-clause in Makefile for building ld++ does not work with either of
  2254. pyramid's makes - but gnu-make groks it.
  2255.  
  2256. Makefile: (quoted from gcc-1.37/Makefile) (for alloca.o)
  2257. + # On a pyramid, you need to uncomment the following line:
  2258. + CLIB = -lc /usr/.attlib/libPW.a
  2259. ------------
  2260.   # HAVE_UNISTD_H = -DNO_UNISTD_H
  2261.  
  2262. + # on pyramids we need -DNO_DOLLAR_IN_LABEL
  2263. +
  2264.   # CFLAGS = -g -DSOS -DESKIT -O
  2265.   #CFLAGS = -g -DGATHER_STATISTICS -O $(COFFLAGS) -B../gcc-test/
  2266. + CFLAGS = -DGATHER_STATISTICS -O $(COFFLAGS)  -DNO_DOLLAR_IN_LABEL -B../gcc-tes
  2267.   CC = gcc
  2268.   BISON = bison
  2269.  
  2270. ===========
  2271. cplus-lex.c:
  2272.   /* If you don't have strrchr, but instead have rindex,
  2273.      add your machine to this list, and send mail to
  2274.      tiemann@wheaties.ai.mit.edu.  */
  2275. ! #if defined(sequent) || defined(convex) || defined(pyr)
  2276. -----> in the ucb-Universe, this true for pyr
  2277. ===========
  2278. collect2.c:
  2279. #include <stdio.h>
  2280. +
  2281. + #ifdef pyr
  2282. + FILE *popen();
  2283. + #endif
  2284. -----------
  2285.  
  2286.   #endif
  2287. +
  2288. + #ifdef pyr
  2289. + /* guessed after the gcc-machine-description */
  2290. + #define TEXT_SECTION_ASM_OP ".text"
  2291. + #define DATA_SECTION_ASM_OP ".data"
  2292. +
  2293. + #define ASM_GLOBALIZE_LABEL(FILE, LABEL) \
  2294. +   fprintf (FILE, ".globl _%s\n", LABEL)
  2295. +
  2296. + #define ASM_OUTPUT_LABEL(FILE, LABEL) \
  2297. +   fprintf (FILE, "_%s:", LABEL)
  2298. +
  2299. + #endif
  2300.  
  2301.   #if defined (__GNUC__) || defined (sparc)
  2302.   #define alloca __builtin_alloca
  2303. ===========
  2304. ld.c:
  2305.   #define INITIALIZE_HEADER N_SET_MACHTYPE (outheader, M_386)
  2306.   #endif
  2307.  
  2308. + #ifdef pyr
  2309. + #define INITIALIZE_HEADER \
  2310. +         outheader.a_machid = PYR90X
  2311. + #endif
  2312. +
  2313.   #ifdef is68k
  2314.   /* This enables code to take care of an ugly hack in the ISI OS.
  2315. ===========
  2316. cplus-dem.c:
  2317.   /* #define nounderscore 1 /* define this is names don't start with _ */
  2318.  
  2319.   #include <stdio.h>
  2320. - #include <string.h>
  2321.   #include <ctype.h>
  2322.  
  2323.   #ifdef USG
  2324. ------------
  2325.  
  2326.   #ifdef USG
  2327.   #include <memory.h>
  2328. + #include <string.h>
  2329.   #else
  2330.   #define memcpy(s1, s2, n) bcopy ((s2), (s1), (n))
  2331.   #define memcmp(s1, s2, n) bcmp ((s2), (s1), (n))
  2332. + #include <strings.h>
  2333.   #define strchr index
  2334.   #define strrchr rindex
  2335.   #endif
  2336. ============
  2337. g++filt.c:
  2338.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  2339.  
  2340.   #include <stdio.h>
  2341. - #include <string.h>
  2342.   #include <ctype.h>
  2343.  
  2344.   char *malloc ();
  2345. ----------
  2346.  
  2347.   #include <stdio.h>
  2348.   #include <ctype.h>
  2349. + #ifdef USG
  2350. + #include <string.h>           /* sun has both of these, but... */
  2351. + #else
  2352. + #include <strings.h>
  2353. + #define strchr index
  2354. + #define strrchr rindex
  2355. + #endif
  2356.  
  2357.   char *malloc ();
  2358.   char *realloc ();
  2359.  
  2360. ===================
  2361. And in the libg++ - directory:
  2362.  
  2363. g++-include/stdio.h:
  2364. + #elif defined(pyr)
  2365. + #define HAVE_SETLINEBUF
  2366. + // in ucb-universe we have _NFILE, but no _bufendtab[] :-(
  2367. + //#define _NFILE      62
  2368. +
  2369. ------------
  2370.   /* check and possibly redefine the following */
  2371. + #ifdef pyr
  2372. + #define BUFSIZ  2048
  2373. + #else
  2374.   #define BUFSIZ  1024
  2375. + #endif
  2376. ------------
  2377. g++-include/math.h:
  2378.   /* sequents don't supply these. The following should suffice */
  2379. ! #if defined(sequent) || defined(DGUX) || defined(pyr)
  2380.   static inline int isnan(double x) { return x != x; }
  2381.   static inline int isinf(double x) { return x > MAXDOUBLE || x < -MAXDOUBLE; }
  2382.   #endif
  2383. ------------
  2384.   #define FMAXEXP     ((1 << _FEXPLEN - 1) - 1 + _IEEE)
  2385.  
  2386. + #elif defined (pyr)
  2387. + /* from /usr/.attinclude/limits.h
  2388. +   #define MAXDOUBLE       0d7fefffffffffffff
  2389. +   #define MAXFLOAT        ((float)0d47efffffe0000000)
  2390. +   #define MINDOUBLE       0d0010000000000000
  2391. +   #define MINFLOAT        ((float)0d3810000000000000)
  2392. + */
  2393. + /* the same from gcc-include/float.h */
  2394. + #define MAXDOUBLE 1.7976931348623141e+308
  2395. + #define MINDOUBLE 2.2250738585072022e-308
  2396. + #define MAXFLOAT  ((float)3.40282347e+38)
  2397. + #define MINFLOAT  ((float)1.17549435e-38)
  2398. +
  2399. + #define _IEEE           1
  2400. + #define _DEXPLEN        11
  2401. + #define _HIDDENBIT      1
  2402. + #define DMINEXP (1-DMAXEXP)
  2403. + #define FMINEXP (1-FMAXEXP)
  2404. + #define DMAXEXP ((1 << _DEXPLEN - 1) - 1)
  2405. + #define FMAXEXP ((1 << _FEXPLEN - 1) - 1)
  2406. +
  2407.   // #elif defined(vax)
  2408.   // use vax versions by default -- they seem to be the most conservative
  2409. =============
  2410. g++-include/fcntl.h includes ``//usr/include/fcntl.h'' that defines
  2411.  
  2412. struct  flock {
  2413.         short   l_type;
  2414.         short   l_whence;
  2415.         long    l_start;
  2416.         long    l_len;
  2417.         short   l_sysid;
  2418.         short   l_pid;
  2419. };
  2420.  
  2421. and also includes <std.h> defining
  2422. int     flock(int, int);
  2423.  
  2424. causing the Warning
  2425. flock' was declared `extern' and later `static'
  2426.  
  2427. ------------
  2428. there are some warnings about enumerated value `foo' not handled in switch
  2429. in regex.cc
  2430.  
  2431. -----------
  2432. tests/test.hello.cc:119: `round_size' undeclared (first use this function)
  2433. tests/test.hello.cc:118: warning: unused variable `rounded_size'
  2434. A typo,I think
  2435.  
  2436. --
  2437. Stefan Petri, Institut fuer Betriebssysteme und Rechnerverbund,
  2438. TU Braunschweig, Germany
  2439. i1100905@dbstu1.bitnet , petri@tubsibr.uucp
  2440.  
  2441. 
  2442. 1,,
  2443. Received: from Eng.Sun.COM (exodus) by teacake.Eng.Sun.COM (4.1/SMI-4.1)
  2444.     id AA06287; Sun, 2 Sep 90 22:58:30 PDT
  2445. Received: from Sun.COM (sun-barr.EBay.Sun.COM) by Eng.Sun.COM (4.1/SMI-4.1)
  2446.     id AA23528; Sun, 2 Sep 90 22:55:22 PDT
  2447. Received: from life.ai.mit.edu by Sun.COM (4.1/SMI-4.1)
  2448.     id AA11227; Sun, 2 Sep 90 22:55:18 PDT
  2449. Received: by life.ai.mit.edu (4.1/AI-4.10) id AA29978; Mon, 3 Sep 90 01:23:50 EDT
  2450. Return-Path: <news@eddie.mit.edu>
  2451. Received: from EDDIE.MIT.EDU by life.ai.mit.edu (4.1/AI-4.10) id AA29974; Mon, 3 Sep 90 01:23:46 EDT
  2452. Received:  by EDDIE.MIT.EDU (5.61/25-eef)
  2453.     id AA07893; Sat, 1 Sep 90 05:30:10 EST
  2454. Path: mit-eddie!rutgers!news-server.csri.toronto.edu!utgpu!watserv1!watmath!att!dptg!ulysses!andante!alice!ark
  2455. From: alice!ark@eddie.mit.edu (Andrew Koenig)
  2456. Newsgroups: comp.lang.c++
  2457. Subject: Re: vtbl for abstract class : WHY ?
  2458. Keywords: abstract class, vtbl
  2459. Message-Id: <11253@alice.UUCP>
  2460. Date: 30 Aug 90 12:57:55 GMT
  2461. References: <2206@runxtsa.runx.oz.au>
  2462. Organization: AT&T Bell Laboratories, Liberty Corner NJ
  2463. Lines: 51
  2464. Apparently-To: lang-c++-netnews-dist@prep.ai.mit.edu
  2465. Status: R
  2466.  
  2467. *** EOOH ***
  2468. Return-Path: <news@eddie.mit.edu>
  2469. Path: mit-eddie!rutgers!news-server.csri.toronto.edu!utgpu!watserv1!watmath!att!dptg!ulysses!andante!alice!ark
  2470. From: alice!ark@eddie.mit.edu (Andrew Koenig)
  2471. Newsgroups: comp.lang.c++
  2472. Subject: Re: vtbl for abstract class : WHY ?
  2473. Keywords: abstract class, vtbl
  2474. Date: 30 Aug 90 12:57:55 GMT
  2475. References: <2206@runxtsa.runx.oz.au>
  2476. Organization: AT&T Bell Laboratories, Liberty Corner NJ
  2477. Lines: 51
  2478. Apparently-To: lang-c++-netnews-dist@prep.ai.mit.edu
  2479.  
  2480. In article <2206@runxtsa.runx.oz.au>, tom@runxtsa.runx.oz.au (Thomas Antalffy) writes:
  2481. > When I make a class abstract by assigning 0 to one of its virtual methods, 
  2482. > my C++ compiler generates a virtual function table and puts the address of 
  2483.  
  2484. >         char __pure_virtual_called() 
  2485.  
  2486. > in the appropriate slot. This later creates a link error, because there is 
  2487. > no default implementation of this function.
  2488.  
  2489. > I assume that this mechanism is there to give you the chance of putting 
  2490. > error handling in __pure_virtual_called().
  2491.  
  2492. No, there should be a __pure_virtual_called() in the library.
  2493. It, in turn, should print an appropriate error message and abort.
  2494.  
  2495. It's there because by chicanery it is possible to call a pure virtual
  2496. in circumstances a compiler cannot detect.  For example:
  2497.  
  2498.     class A {
  2499.     public:
  2500.         A();
  2501.         virtual void f() = 0;
  2502.     };
  2503.  
  2504. No problem so far, right?  You can't create an A object, of course.
  2505.  
  2506.     void callf(A* ap)
  2507.     {
  2508.         ap->f();
  2509.     }
  2510.  
  2511. Still no problem.  Since you can't create an A object, ap must in
  2512. fact point to an object of a class derived from A, which in turn must
  2513. have defined an f() member.
  2514.  
  2515. Now look at this:
  2516.  
  2517.     A::A() { callf(this); }
  2518.  
  2519. Again there is no way for the compiler to see what's wrong.
  2520. The callf function might just plug data members of A, in
  2521. which case it would be harmless.  What it actually does, of
  2522. course, is to try to call the nonexistent f() member of the
  2523. A object!
  2524.  
  2525. So you see the point.  In principle you should not be allowed to
  2526. call a pure virtual but you can by trickery.  It is better to obtain
  2527. a clear diagnostic in that case than a random crash.
  2528. -- 
  2529.                 --Andrew Koenig
  2530.                   ark@europa.att.com
  2531.  
  2532.